Calciro

Rafter Calculator

Calculate the length of a common roof rafter using your building's width, roof pitch, overhang, and ridge board thickness.

Fill in the required fields to see your result.

Use this calculator on your website

Add this free Rafter Calculator to your blog, article, or business website. Copy the embed code and publish it in minutes.

Perfect for blogs, WordPress, Webflow, and business websites.

This is the rafter's line length — measured along a line parallel to the rafter's edge, from the inside of the birdsmouth notch to the ridge cut. It does not include the birdsmouth notch depth or tail cut allowance.

Need a calculator like this?

Calciro can build a custom calculator around your formulas, pricing rules, or lead-generation process.

How to Measure for Rafters

You need three things: your building's width (the span the roof covers), the roof pitch (rise per 12 inches of run, e.g. "6:12"), and how far you want the roof to overhang the wall. Ridge board thickness matters too — thicker ridge boards slightly shorten each rafter.

How to Calculate Rafter Length

Rafter length uses the Pythagorean theorem on half the building's span and the roof's rise, adjusted for overhang and ridge board thickness.

Rafter Calculator Formula

  1. Half Span = Building Width ÷ 2
  2. Slope Factor = √(Pitch² + 12²) ÷ 12
  3. Rafter Length = (Half Span + Overhang − Half Ridge Thickness) × Slope Factor

How Long Should My Rafters Be?

Depends entirely on your building's width and roof pitch — steeper pitches and wider buildings both increase rafter length. There's no standard length that applies across different roof designs.

Rafter Measurement Examples

Standard gable roof: 20 ft wide building, 6:12 pitch, 16" overhang, 1.5" ridge board. Rafter length ≈ 12.60 ft.

Steeper roof, wider span: 24 ft wide building, 8:12 pitch, 12" overhang, 1.5" ridge board. Half span = 12 ft. Slope factor = √(64+144)/12 ≈ 1.202. Rafter length = (12 + 1 − 0.0625) × 1.202 ≈ 15.55 ft.

Common Roof Pitches

4:12 to 6:12 is common for standard residential roofs. 7:12 to 9:12 gives a steeper, more traditional look and sheds snow more effectively. Pitches above 9:12 are less common and require more material per square foot of building footprint due to the added rafter length.

Common Rafter Measurement Mistakes

Measuring overhang along the roof slope instead of horizontally from the wall — overhang is a horizontal measurement. Forgetting the birdsmouth notch allowance — this calculator gives the rafter's line length; add a small allowance when ordering actual lumber. Using the wrong half of the building width for a shed (single-slope) roof, which uses the full span rather than half of it in the base calculation.

How to Use This Calculator

Enter the building width, roof pitch (as X in X:12, e.g. enter 6 for a 6:12 pitch), the eave overhang, and the ridge board thickness.

Formula & Methodology

Rafter length uses the Pythagorean theorem, adjusted for overhang and ridge board thickness: Half Span = Building Width ÷ 2. Slope Factor = √(Pitch² + 12²) ÷ 12. Rafter Length = (Half Span + Overhang − Half Ridge Thickness) × Slope Factor.

Example: 20 ft building, 6:12 pitch, 16" overhang, 1.5" ridge board

Half span = 10 ft. Overhang = 16÷12 ≈ 1.33 ft. Half ridge = 0.75÷12 ≈ 0.0625 ft. Slope factor = √(36+144)/12 ≈ 1.118. Rafter length = (10 + 1.33 − 0.0625) × 1.118 ≈ 12.60 ft.

Calculates common rafter length only (a simple gable roof). Does not calculate hip or valley rafters, which use a different (longer) formula. Does not account for birdsmouth notch depth, which adds a small amount to the total board length needed. For spans over 20 feet, heavy snow loads, or non-standard framing, consult span tables or a structural engineer.

For estimation and planning only. Verify rafter size and span against local building code span tables or a structural engineer before framing.

Related Calculators

Related Guides

Frequently Asked Questions

How is rafter length calculated?
Using the Pythagorean theorem on half the building span and the roof's rise, then adjusting for the eave overhang and ridge board thickness.
What does a 6:12 pitch mean?
The roof rises 6 inches vertically for every 12 inches of horizontal run. Common residential pitches range from about 4:12 to 9:12.
Does rafter length include the overhang?
Yes — enter your desired overhang and it's included in the total rafter length calculation.
What is the birdsmouth cut?
A notch cut where the rafter rests on the wall's top plate, consisting of a level seat cut and a vertical heel cut. This calculator gives the rafter's line length; add a small allowance for the birdsmouth and tail cut when ordering lumber.
Does this work for hip roofs?
No — this calculates common rafters for a standard gable roof. Hip rafters run at 45° from the corners and use a different, longer formula.

Last updated 7/12/2026