A roofline is lit with a tape measure and a notebook long before anyone climbs a ladder. Measure every edge you plan to light in feet, add about a tenth for corners and the run to the outlet, and the total converts straight into bulbs and strands. Buying by eye usually leaves a gable half done on a cold evening, with the store sold out of the same set.
It also lets the lights go up on the right day. A dry, mild afternoon in November is easier on the hands, safer on the ladder, and kinder to the roof than the first freezing weekend of December, when shingles are brittle and gutters are icy.
The Roofline, Slopes Included

Eaves are easy to measure from the ground. They run along the walls, so the length of each wall that has a gutter is the length of light it needs. Pace it or run a tape along the base of the wall. Gables are where estimates go wrong. The two sloped edges of a gable are each longer than half its width, and the steeper the roof, the longer they are.
Multiply half the gable’s width by a factor for the pitch: about 1.12 for a shallow roof that rises 6 inches per foot, 1.2 for one that rises 8, and 1.41 for a steep roof that rises a foot for every foot across. A front gable 24 feet wide on an 8 inch pitch has two slopes of about 14.4 feet each, nearly 29 feet of edge where the width suggests 24.
As a worked example, a house with 40 feet of front eave and that gable needs about 69 feet along the roof. Add a tenth, about 7 feet, for corners and slack, and the lit edge comes to 76 feet. The run from the nearest corner down to the outlet is extra, and is usually an outdoor extension cord, not bulbs.
Bulbs, Spacing, and Strands

Large bulbs for a roofline, the C9 size, are most often sold with sockets 12 inches apart, so the count of feet is also the count of bulbs, about one per foot. Closer spacing, 8 inches, looks brighter and takes half again as many bulbs. Wider spacing, 15 inches, looks sparser and older in style. Sets commonly come in 25 foot strands of 25 bulbs, so the 76 feet in the example needs 76 bulbs. Three strands come up a foot short, so buy four and tuck the spare end back along the last stretch of gutter.
Check the box for how many sets can be joined end to end. Every set states a limit, and it varies widely, a few sets for older incandescent bulbs and many more for LEDs. If the run is longer than the limit, split it into two runs fed from separate outlets or from both ends. Count the strands for the eaves and the gable separately, since a gable usually needs its own run starting at a corner.
Trees and Shrubs

A tree trunk wrapped in a spiral needs more light than its height suggests. Measure around the trunk, decide the spacing between turns, and multiply. A trunk 2 feet around, wrapped every 6 inches from the ground to where the branches start 8 feet up, takes 16 turns of 2 feet, 32 feet of lights, plus the run back to the ground. Mini lights suit trunks and branches, since a large bulb sticks out from the bark.
Round shrubs are easiest under nets, which come in sizes, commonly about 4 by 6 feet, and lie over the shrub like a cloth. Measure across the top of the shrub and down both sides to the ground, and buy the net that covers that. A row of matching boxwood looks best with one net each, all from the same set, so the bulbs match. For the porch railing and steps, the porch guide covers lighting closer to the door.
Power, Clips, and the Weather

Use only lights and extension cords marked for outdoor use, and plug them into an outdoor outlet with GFCI protection, which cuts the power when current leaks, as it can when water gets into a connection. A weatherproof cover that closes over the plugs, with the cords leaving through its bottom, keeps rain off the timer and the plug. A timer saves going out in the cold every evening and turns everything off when the house is asleep.
Hang the lights with plastic clips made for gutters or for sliding under shingle edges, one per bulb, never nails or staples, which pierce the cord and leave holes in the gutter or roof. Clips sold for C9 bulbs don’t fit smaller ones. Fit shingle clips on a mild day, since cold shingles crack when lifted. When the lights come down in January, wind each strand around a piece of cardboard and label it for the edge it fits, and next year the measuring is already done.