The escape velocity of an object from the earth depends upon the mass of earth (M), its mean density $(\rho)$, its radius (R) and gravitational constant (G), thus the formula for escape veloctiy is
The escape velocity ( u) can be derived from the relationship between gravitational force and the required kinetic energy to escape. Given the mass of the Earth (M), its mean density ( ho), its radius (R), and the gravitational constant (G), the formula is $ v = R \\sqrt{\\frac{8 \\pi}{3} G \\rho} $. This formula is derived from the standard escape velocity formula and the relation between density, mass, and volume.