Potential energy =
(mass) x (gravity) x (height above the reference level) .
-- Relative to the floor, the rock's potential energy is
(24 kg) x (9.8 m/s²) x (0) = zero .
-- Relative to the basement floor, 3 meters below, its potential energy is
(24 kg) x (9.8 m/s²) x (3 m) = 706 joules (rounded) .
-- Relative to the roof, 6 meters above, its potential energy is
(24 kg) x (9.8 m/s²) x (-6 m) = negative 1,411 joules (rounded)