The mercury density (at liquid state) is

And we know that the pressure at the bottom of a column of fluid is given by (Stevin's law)

where

is the liquid density
g is the gravitational acceleration
h is the height of the column of fluid
The pressure at the bottom of the beaker is

, therefore we can re-arrange the previous equation to get the height of the column of mercury
