Is the radius used in the formula for the escape velocity the average radius of the celestial object or the radius at the starting location? I learnt that the escape velocity is given by $$v_e = \sqrt{\frac{2GM}{r}}$$

Say I want to launch a rocket from the earth into space and want to calculate the escape velocity $v_e$ (I guess without air resistance). Which value of $r$ do I have to use:


The mean radius of the earth...
... or the distance between the center of mass of the earth and the launch location?


Thanks in advance.

(I have basic classical (and quantum) mechanics knowledge, but I am very new to orbital mechanics.)
Just to provide an official answer, the radius $r$ in that equation is formally the distance between the center of masses between the two objects. That does come with some assumptions of course, but for most standard physics problems that concept is perfectly fine. As you stated, the equation does not assume anything about air resistance, and to extend that, it does not assume anything about continued propulsion. If you're at some radius $r$ from the center of the Earth and you have some velocity $v&gt;v_e$, then just coasting along in your trajectory will allow you to eventually escape the Earth's gravitational pull (ignoring the obvious case where you intersect the Earth with your trajectory).