Just multiply average density by volume.
kg/m^3 x m^3 = kg
Useful for rocky/icy planets, but will be trouble on gas giants due to the extreme changes in density going down to the core.
For surface gravity, F= GMm/r^2
Where gravitational constant G = 6.67300 × 10-11 m3 kg-1 s-2
Big and little masses M & m and the surface radius.
Little m will cancel out when you do F=ma to get the acceleration.
A = GM/R^2
Just remember to use the same units throughout.
PS:
Have fun picking a surface for your gas giant, and don't count any material above the surface in your mass calculation
[ August 20, 2003, 15:24: Message edited by: Suicide Junkie ]