From the escape velocity formula
$$v_e = \sqrt \frac {2GM}R.$$
Some sources say it is the distance between two objects with mass $M$ and $m$. Some examples I have read, only used radius of the $M$. For simplicity sake, lets use a rocket and planet Earth.
I google the escape velocity of earth as 11.186 km/s. I looked through example such as this. This particular example said that the escape velocity is \begin{align} v_e & = \sqrt {2gR} \\ & = \sqrt {2\times9.8\:\mathrm{m/s^2} \times6.4\times10^3\:\mathrm{km}} \\ & = 11.2 \: \mathrm{km/s} \end{align} I do know that $g = \frac {GM}{R^2}$, but in this example, the escape velocity is calculated using r as radius of earth. The radius of the Earth according to google is 6371 km or 6.4e6 (the value used for the calculation).
My question is, $R$ the radius of of the earth ($M$) or the distance between the rocket ($m$) and Earth? What I think makes sense is the radius of the Earth ($M$) because how could escape velocity be calculated without knowing the height it has to travel.
To add about the info Distance from M and m, Some sources say that R is actually $$R = r_e + h_\mathrm{atmosphere}$$