We believe math and science education should be free and accessible to everyone. Why education matters >

Roof Length Calculator

The roof length calculator determines the straight-line distance from eave to ridge for any pitched roof. This number is what you need when ordering metal roof panels, underlayment rolls, or shingle courses by run. It also returns total rafter length (including overhang), ridge height above the wall plate, and full roof surface area in both square feet and roofing squares.

What Is Roof Length?

Roof length has two meanings in residential construction:

  1. Roof slope length: the straight-line distance from eave to ridge measured up the slope of the roof. This is the number you order metal panels and underlayment by.
  2. Rafter length: the full length of a rafter from ridge to the tip of the overhang. This is what you cut lumber to.

This roof length calculator returns both.

Roof Length Formula

Roof length uses the Pythagorean theorem applied to the roof triangle:

Slope length = sqrt(run^2 + rise^2)

Where:

  • Run = half the building span (half the width wall to wall)
  • Rise = run x pitch/12 (for a 6:12 pitch, rise = run x 0.5)

For a 32 ft wide building with a 6:12 pitch:

  • Run = 32 / 2 = 16 ft
  • Rise = 16 x (6/12) = 8 ft
  • Slope length = sqrt(16^2 + 8^2) = sqrt(256 + 64) = sqrt(320) = 17.89 ft

Roof Rafter Length Calculator

The roof rafter length calculator adds the overhang to the slope length. For a 12-inch eave overhang on a 6:12 pitch:

  • Overhang run = 1 ft
  • Overhang rise = 0.5 ft
  • Overhang slope = sqrt(1 + 0.25) = 1.118 ft

Total rafter length = 17.89 + 1.12 = 19.01 ft or roughly 19 ft 0 in.

Roof Rafter Length Table (Quick Reference)

This table replaces the old printed roof rafter length table found in framing guides. Slope length per foot of run:

Pitch Slope length per foot of run
3:12 1.031 ft
4:12 1.054 ft
5:12 1.083 ft
6:12 1.118 ft
7:12 1.158 ft
8:12 1.202 ft
9:12 1.250 ft
10:12 1.302 ft
12:12 1.414 ft

To find rafter length: multiply run (half the span) in feet by the factor for your pitch. Example: 16 ft run at 8:12 pitch = 16 x 1.202 = 19.23 ft.

Roof Surface Area

For a simple gable roof, roof area = 2 x (rafter length x building length). Roofing materials are sold by the "square" (100 sq ft), so divide by 100 to get squares.

Example: 32 ft x 40 ft building with 6:12 pitch and 12 in overhang:

  • Rafter length = 19.01 ft
  • Roof area = 2 x 19.01 x 40 = 1,521 sq ft
  • Roofing squares = 15.21

Add 10 percent for waste on standard shingles, 15 percent for architectural patterns, and 20 percent on complex roofs with valleys.

Using Roof Length for Metal Panels

Metal roof panels come in lengths up to 40 ft. Measure roof slope length first. If your slope length is 19 ft, order 19 ft panels cut to length, or 20 ft panels and trim to fit. Never splice a single slope run with multiple shorter panels unless using a floating seam system.

Did this solve your problem?

Frequently Asked Questions

Search Calculators

Search across all calculator categories