Let $T$ be an undirected tree, let $d$ be the diameter of $T$, and let $s$ be the number of vertices in $T$ with degree less than 3. Recall the diameter of a graph is the length of the longest shortest path in $T$.
Consider the star graph $S_n$ on $n$ vertices. It is easy to see that the difference between $d$ and $s$ can be arbitrarily large. In this case, $d$ is always 2, but we can make $s$ how ever large we wish. In a path graph, $s-d=1$.
Is it possible to construct a tree where $d$ is greater than or equal to $s$? I don't think it is, but is there a simple argument to show it?
Direct proof:
(and the path graph shows that this bound is tight).