Bottling by weight: 4 ounces of sugar for 2.4 gallons
For a long time I primed bottles with a sugar measurement I had copied from somewhere: a cup for five gallons, half a cup for my batches. A couple of overcarbonated batches and one that barely fizzed convinced me to start weighing instead of scooping, and to measure how much beer I actually had rather than how much the recipe said I should.
The first part was marking the bottling bucket. I added water a quart at a time and marked the outside with a permanent marker. It turns out that my batches, after the trub and the hydrometer samples and the inch I leave behind, come to about 2.4 gallons in the bottling bucket, not the 2.5 I had been assuming. For a typical ale I want about 2.4 volumes of carbon dioxide. With the beer finishing fermentation at around 66 °F, which leaves a small amount of carbon dioxide already dissolved, the tables I use put that at just under 4 ounces of corn sugar for 2.4 gallons. So I weigh out 4.0 ounces, dissolve it in a cup of water, boil it for five minutes, cool it, and pour it into the empty bucket before racking the beer gently on top so the siphon swirls it in.
That gives me 24 bottles and usually one or two extra, which I open at intervals as a check. At one week in a 70 °F closet the test bottle should hiss and pour with a thin head that fades fast; at two weeks it should be fully carbonated. The batch that barely fizzed had been left in the garage in November at 58 °F, and two weeks there is not enough. Moved indoors, it was fine ten days later. The yeast was not dead, just cold.
The gushers came from the opposite error. I had used my old half-cup measure, which weighed out at 5 ounces when I finally checked it, in a batch that came to only 2.2 gallons. That is well over 3 volumes, and the bottles foamed over the moment they were opened. Nothing broke, but I kept them in a lidded plastic tub for the rest of their lives just in case.
So the rule now is: weigh the sugar, read the actual volume off the bucket, let the beer settle to the right temperature before bottling, and keep the bottles above 68 °F for two weeks. Four small habits, and carbonation stopped being a surprise.