Knowing your mast height is very important when you go cruising because you will encounter bridges and it would behoove you to know if you will fit under said bridge! If you hit a bridge, your chainplates and spar will suffer considerable damage that could easily cause your yacht to become a "total loss" according to your insurance company.
Measuring your mast height is very simple, or complicated if you want to take it to the next level. All you need to do is attach a messenger line to the main halyard and run it up the mast until the halyard reaches the shiv. Simply cleat off the halyard so you can pull tightly on the messenger line and carry out the measuring process.
Now, all you need to do is to take the other end of your messenger line and lead it down to your waterline. With the messenger line pulled tight, you will create a straight line from your mast head to the waterline next to your boat. Without you realizeing it, you have created a right triangle that will aid you in your further calculations.
If you want to keep your measurement simple, you can simply mark the end of the messenger line (where it got wet as it met the waterline) and measure the distance to the masthead shiv. This is a slightly longer than true mast height measurement.
If you want to take it a step further, you can now use the triangle you have created to calculate the rest. The messenger line is the hypotenuse of the right triangle. Half the beam is the base of the triangle, and the mast height is the unknown.
Using Pythagoras's Theorem, you can solve for the unknown mast height. Pythagoras's Theorem is:
a^2 + b^2 = c^2
a is the height, b is the base, and c is the hypotenuse.
the equation could then be reworked to fit our needs as:
a^2 = c^2 - b^2
and then further broken down into
a = (c^2)^(1/2) - (b^2)^(1/2)
This could be again simplified using the actual boat measurements into the following equation:
Mast Height = (Messenger Line Length ^2)^(1/2) - ((Beam/2)^2)^(1/2)
If you feel like indulging your mind a bit further, you can now factor in the height of the mast above the shiv by using a wooden dowel. The dowel is attached to the halyard and tied in a a guesstimated height above the line. When the halyard is pulled up all the way, the dowel will point up and above the mast head and it can then be evaluated from a distance. The top of the dowel should be the same height as the top of the antenna on the masthead. If it looks a bit taller, simply scoot the dowel down on the knot. If the dowel looks a bit shorter, simply scoot the dowel up on the knot.
When you finally set the dowel so that it is the same height as the tallest item on your mast, simply add this distance to your messenger line (or true mast height if you calculated it) and this will be your actual mast height clearance.