Referring to the figure below, consider a body floating about its fore-and-aft axis with a planeform symmetry. The upright position of the body keeps it in an equilibrium state due to the effect of two equal and opposite forces: its own weight W passing through its center of gravity and the force of buoyancy FB passing through its center of buoyancy.
The force of buoyancy FB is given by:
FB = ρgV
Where ρ is the density and V is the volume of the liquid displaced.
Now suppose as illustrated in the adjoining figure, if the body is tilted about its fore-and-aft axis, this forces the body to go through an unsymmetrical submergence, shifting its center of buoyancy from B to B1.
The metacenter M in the above condition is located by drawing a vertical line BC through B1.
In case of smaller tilt angles,
BB1 = BM.dθ
Also, at a distance y from the fore-and-aft axis, a small portion of the volume of the liquid dx.dy.ydθ exerts a moment about the axis due to its weight dx.dy.ydθ.ρg which may be expressed as:
dM = dx.dy.yd.ρg.y
Therefore the total moment by the contained liquid in the volume of the shown container over the whole body can be given as:
ρgθ ∫(+y to -y) ∫(F to A) y2dxdy = ρgdθ A∫Fy2dA = ρgdθ/I
However since the above moment must happen about the horizontal shift and also should be equal to it, the force of buoyancy can be written as:
FB.BB1 = ρgdθ.I
ρgV.BM.dθ = ρgdθ.I
Cancelling the common members ρgdθ.I from both sides, we get:
BM = I/V
Where V is the volume of liquid displaced by the body and I is the moment of inertia about the fore-and-aft axis.
Finally the metacentric height of the floating body may be expressed as:
CM = BM – BC = I/V – BC