What this calculator does
A common rafter is the sloping member that runs from the ridge to the wall plate, and its length is set by the building width, the roof pitch, and the overhang. Framing plans often give the pitch and the span but leave the rafter length to be worked out on site, and a small error at that stage shows up as a roof that does not meet the ridge or an overhang that is too short. This calculator converts the span and pitch into run, rise, and rafter length, adds the overhang measured along the slope, and estimates how many rafters the roof needs from the spacing. It is geometry for layout. It does not choose the member size, check the span rating, or account for snow, wind, or seismic loads, and those decisions belong to the framing design and the local building code.
How to use it
- Enter the full building width that the roof spans.
- Enter the building length to estimate the number of rafters.
- Enter the roof pitch in degrees.
- Enter the eave overhang as a horizontal projection.
- Enter the ridge board thickness and rafter spacing.
- Use the rafter length for cutting and the count for ordering material.
How it works
Example calculations
Example 1: 8 m wide at 30°
An 8 m wide building with a 40 mm ridge and a 30° pitch has a run of 3.98 m and a rise of 2.30 m. The slope length from wall to ridge is 4.60 m, and a 0.4 m horizontal overhang adds 0.46 m along the slope, so the common rafter is about 5.06 m before any waste.
Example 2: A steeper pitch
The same 8 m building at 45° has a run of 3.98 m, a rise of 3.98 m, and a slope length of 5.63 m. With the same overhang the rafter is about 6.20 m. Steeper roofs use longer rafters and more material for the same footprint, and the roof area rises too.
Example 3: Counting rafters
A 12 m long building with rafters at 600 mm centres needs 21 positions per side, or 42 rafters for both sides of a gable. At 5.06 m each that is about 212 m of rafter material. Ordering by length and allowing for cuts, hips, and waste is more accurate than multiplying the count by the rafter length alone.
What the result means
The rafter length is the hypotenuse of the roof triangle plus the overhang, and the pitch is the number that ties them together. A small change in pitch moves both the rise and the rafter length, and it also changes the roof area and the material quantities. The count depends on the spacing along the building length, not on the width. Common rafters are only one part of a roof frame: hips, valleys, jack rafters, ceiling joists, and bracing all need their own layout, and the member size must be checked against the span and the loads. Use the calculated length to plan cuts and to sanity-check a framing plan, then follow the design for the structural details.
Common mistakes
- Measuring the run from the outside of the wall instead of the centre of the ridge.
- Adding the overhang horizontally instead of along the slope.
- Using the building length to calculate the run.
- Forgetting to allow for the ridge board thickness.
- Ordering the exact calculated length with no allowance for cuts and defects.
- Treating a geometric rafter length as a structural member size.
Assumptions and limits
- The roof is a simple gable with a central ridge.
- The pitch is measured in degrees from horizontal.
- The overhang is a horizontal projection past the wall.
- Rafters are spaced evenly along the building length.
- The building width and length are measured to the wall plates.
- No hips, valleys, or intersecting roofs are included.
Frequently asked questions
How do I convert a roof pitch to an angle?
Pitch is often given as rise per 12 units of run. The angle is the arctangent of rise divided by run. A 6/12 pitch is a rise of 6 for every 12 of run, which is about 26.6°.
Why subtract the ridge thickness?
The run is measured to the centre of the ridge, but the rafter stops at the face of the ridge board. Subtracting half the ridge thickness from half the building width gives the correct run to the plumb cut.
How much overhang should I use?
It depends on the climate, the wall finish, and the design. Overhangs protect walls from rain but add uplift load in high-wind areas. The right figure comes from the design and the local code, not from the rafter geometry alone.
How many rafters do I need?
Divide the building length by the spacing, round up, add one for the end, and double for both sides of a gable. For a 12 m building at 600 mm spacing that is 21 positions per side, or 42 rafters.
Can I use this for a hip roof?
Only for the common rafters in the main span. Hip and valley rafters have different geometry and need their own layout. The calculator is for a simple gable roof.
How much waste should I allow?
A common allowance is 5% to 10% for cuts, defects, and mistakes, and more for complex roofs. Ordering standard lengths and cutting from them usually produces less waste than ordering exact lengths.
Sources
2026 update
How to use the professional output
This page is not just a formula box. The result is designed to be checked, compared, and taken away.
- Professional worksheet. The result includes the inputs used, the method and scope, and a one-variable sensitivity check for finance calculators.
- A/B scenarios. Save two input sets in the browser and compare the primary, secondary, and breakdown figures side by side.
- Print / PDF and CSV. Print a branded worksheet, or export the year-by-year table when the calculator produces one.
The formulas and assumptions above still govern the number. The worksheet makes the estimate auditable; it does not make it a lender quote, tax return, or personalized advice.