The position of the masthead in a fore-aft position to the mast step (also known as rake) is an important point of adjustment for sail handeling. If the masthead is too far forward, the boat will suffer from lee helm, the desire for the boat to turn downwind. If the masthead is too far aft, the opposite will occur and the yacht will suffer from weather helm, the desire for the boat to turn upwind. Somewhere in the middle of these two positions is the sweet spot where the forces will be equal and the yacht will sail straight and balanced.
For safety reasons, most yacht designers incorporate a little bit of weather helm into the yacht so that if you were to fall overboard, the yacht would eventually turn upwind and stall. This would theoretically allow you to swim back to your yacht and perform your own rescue.
While the theory about masthead position is all well and good, it can be a bit daunting to perform in practice. When you stand on the deck, the mast just looks like it goes up. It is almost impossible to visualize if it is slightly forward or aft of its desired position. Even more compounded when the specifications call for the masthead to be raked 8 inches aft. 8 inches aft of what?! How can you tell where the masthead is way up there and then how are you supposed to position it 8 inches aft?
There is a simple trick to this dilemma, and it involves gravity.
A mast is supposed to be raked aft. This means that the front of the masthead will lie over the mast base and the rear of the masthead will hang aft of the entire spar. The main halyard exits the masthead on the aft side of the spar and is thus the perfect candidate for this exercise and measurement. By hanging a large jug of water, say around 1 gallon, by the main halyard, the halyard will transform into a plumbline which can be used to measure the position of the masthead relative to the step.
If you have access to a drawing of your boat by its designer, it will usually tell you how many inches aft the mast should be raked. If you have this information, all you need to do is tighten the backstay while you loosen the headstay and move the masthead aft until the halyard (which is now a plumb line) marks the distance desired.
The point that you will be measuring will be your gooseneck, which you can think of as "inch 0" since it attaches to the aft of the mast. Each inch aft of the gooseneck as you move down the boom will be your point of measurement.
For example, if you need to position the masthead aft by 5 inches, you will simply adjust the headstay and backstay until your halyard crosses the boom 5 inches aft of the gooseneck.
Having a designer tell you how to set everything up is wonderful, but what if you are not graced with that knowledge? There is a simple starting point that can point you in the right direction.
In general, you want your masthead to sit just aft of the mast step. If you think of the spar as a tube in space, and you compress the tube vertically until it is nothing more than the oval at the bottom and the oval at the top on a flat plane; you would see the oval at the bottom (the mast step) sit right in front of the oval at the top (the masthead).
What this means is a good starting point is to position the aft side of the masthead the distance aft of the gooseneck that the spar measures fore-aft. If you have a 4 inch spar, you will hang your halyard plumb line 4 inches aft of the gooseneck. If your spar is 12 inches fore-aft, then you will hang your halyard plumb line 12 inches aft of the gooseneck.
This is obviously just a starting point and should be adjusted from there depending on how the balance of your yacht feels. If you find that you have too much lee helm, rake the mast further aft. If you find that you are struggling with weather helm, ease the masthead forward a bit.
With tuning and practice, you will find the sweet spot that your mast likes to be for your given yacht and sailplan. Most importantly, when you find this sweet spot, measure it and write it down so that the next time you take your mast off, you will know exactly where to set it when you are recommisioned.