Righting moment is the torque trying to return a boat into equilibrium, upright, when the boat is heeled.
This may be the most important single factor affecting the boat stability.
The magnitude of the torque can be calculated by multiplying the horizontal distance between the center of gravity of the boat and center of buoyancy of the underwater part of the boat by the boat displacement.
This sounds easy, but is not. To calculate the position of the center of buoyancy for all possible heeling angles and for all possible hull cross sections is not a trivial task.
Center of gravity sounds easier. You would think it lies on the center line of the boat, some distance above the bottom. This is more or less true for large boats. But for small boats, in the one sheeter or kayak category, it is not.
If the weight of the boat is 30 lbs and Your weight is 200 lbs, then the center of gravity of the boat plus You has very little to do with the boat, it's mostly about You. If You sit stiff in the middle of the boat, then the center of gravity is in line with the boat center line. But most of the time You don't sit stiff.
It seems, that when a small boat heels, most people "counter heel". If You model the center of gravity to lie on the boat centerline, the "counter heeling" has the same effect as lowering the center of gravity.
As long as the righting moment increases proportionally with the heeling angle, the boat acts like a theoretical torsional spring.
How to calculate and understand righting moment of a sailboat -
Plug and chug