toolsfor.living home

Sheet A-4Roof framing

Roof Pitch and Rafter Length Calculator

Enter the run, the pitch and the overhang. Get the rafter length to cut, the pitch in degrees and how many rafters to buy. Free, no sign-up, and it works in your browser.

Axonometric line drawing of a gable shed frame: floor deck, stud walls, top plates, common rafters in pairs and the ridge board, with a 6 in 12 pitch symbol on the end rafter 126 1 2 3 4
  • 1Ridge
  • 2Common rafter
  • 3Overhang tail
  • 4Top plate

Check local code. This tool gives rafter lengths only. It gives no advice on rafter size, span, spacing or loads: check your local building code, span tables and plans before you cut.

Design dataFill in what you know

For 6/12 type 6.

Your rafters

  • Cut length with overhang, along the slope10 ft 3/4 in
  • Pitch6 in 12
  • Angle26.57 degrees
  • Rafter per foot of run1.118 ft (1 ft 1 7/16 in)
  • Rise over the run48 in
  • Rafters per side10
  • Rafters in all (gable)20
Building sectionDrawn to scale from your numbersScale: graphic
Roof framing planRafters at their spacing
Common rafterLaid flat, marked to cut

Cut-length summary

Run to the ridge, along the slope8 ft 11 5/16 in
Overhang tail, along the slope1 ft 1 7/16 in
Total to cut10 ft 3/4 in

Lengths are measured along the top edge from the ridge to the tail end, to the nearest 1/16 inch. No deduction is made for ridge board thickness, the birdsmouth cut or fascia. The rafter count is an estimate to confirm against your plans. Check local code before you cut.

Worked example: an 8 ft run at 6/12Sheet A-5 · Notes

A shed is 16 ft wide, so the run is 8 ft. At 6/12 the roof rises 6 inches for every 12 inches of run, an angle of 26.57 degrees. Each foot of run takes 1.118 ft of rafter. Over 8 ft of run that is 8.944 ft, or 8 ft 11 5/16 in, before overhang. With a 12 in level overhang the horizontal distance is 8 + 1 = 9 ft, and 9 divided by cos 26.57 degrees gives 10.062 ft, or 10 ft 3/4 in. For a building 12 ft long at 16 in on centre you need 10 rafters a side, 20 rafters in all.

How it worksThe right triangle

A rafter is the long side of a right triangle. The run is the flat side, the rise is the upright side, and the rafter is the slope. The pitch is the rise per 12 inches of run, and the angle is the arctangent of rise over run. The rafter length is the horizontal distance divided by the cosine of that angle, which is the same as the Pythagorean rule.

If you know the span, tick the span choice and the tool halves it for you. If you know the angle in degrees or the total rise in inches, pick that and the tool works out the pitch in 12. Overhang is measured level, from the wall to the tail end, and is added to the run before the length is found. The count rule is the building length divided by the spacing, rounded up, plus one for the last rafter, on each side. Every number comes from one rules file, and none is made up.

Not applied: ridge board thickness, birdsmouth cuts, the tail cut style and fascia. Take those off or add them on the board when you mark it. This tool gives no rafter size, span or load advice. Check local code and span tables.

What you will need to mark and cut rafters

Mark the plumb and level cuts on every rafter with a speed square, and use a framing square to step off the length. A circular saw makes the cuts, and rafter hurricane ties hold each rafter to the wall plate where your plans call for them.

For building tools and equipment, see Vevor.

Some shop links on this page may be affiliate links. If you buy through one, toolsfor.living may earn a small commission at no extra cost to you. It never changes what we suggest.

QuestionsRequests for information

How do I calculate rafter length?

Divide the horizontal run by the cosine of the roof angle. For an 8 ft run at 6/12 that is 8 divided by cos 26.57 degrees, or 8.944 ft (8 ft 11 5/16 in) before overhang.

What is a 6/12 pitch in degrees?

A 6/12 pitch rises 6 inches for every 12 inches of run, which is 26.57 degrees.

How many rafters do I need for a shed roof?

Divide the building length by the spacing, round up, add one for the end, and double it for a gable roof. A 12 ft building at 16 in on centre needs 10 per side, 20 in all. A shed (single slope) roof needs only one side.

How do I add overhang to a rafter?

Add the level overhang to the run before you divide by the cosine. A 12 in overhang on an 8 ft run at 6/12 gives (8 + 1) divided by cos 26.57 degrees, or 10 ft 3/4 in.

Check local code. Rafter size, span and spacing depend on your snow and wind loads and your local building code. Confirm them before you build.