In this short note we will provide a sufficient and necessary condition to have uniqueness of the location of the maximum of a stochastic process over an interval. The result will also express the mean value of the location in terms of the derivative of the expectation of the maximum of a linear perturbation of the underlying process. As an application, we will consider a Brownian motion with variable drift. The ideas behind the method of proof will also be useful to study the location of the maximum, over the real line, of a two-sided Brownian motion minus a parabola and of a stationary process minus a parabola.