Home Improvement

Rafter Length Calculator

Enter the span and pitch to get the rafter length, the plumb and seat cut angles and how many rafters the roof needs.

Your numbers

Applies to the building span and building length.

Outside of the wall to outside of the wall, the width the roof covers.

The top number of a pitch such as 6/12.

Horizontal distance from the outside of the wall to the end of the tail, in the unit above. Enter 0 for none.

Actual thickness. A 2x ridge board is 1.5 inches. Enter 0 for no deduction.

Actual width of the top plate. This sets the level seat cut of a birdsmouth.

Length along the ridge. Gives the rafter count and the ridge board length.

Optional. Leave blank to skip the cost estimate.

Result

Common rafter length

14 ft 5.6 in

26.57 degrees, plumb cut 63.43 degrees, 48 rafters

Pitch angle
26.57 degrees
Slope factor
1.118
Run to the ridge face
11 ft 11.3 in (143.25 in)
Plate line to ridge cut, along the slope
13 ft 4.2 in (160.16 in)
Tail (overhang) along the slope
1 ft 1.4 in (13.42 in)
Total rafter length
14 ft 5.6 in (14.465 ft)
Minimum stock length
16 ft board
Plumb cut angle, from the board edge
63.43 degrees
Level cut angle, from the board edge
26.57 degrees
Framing square settings
12 on the blade, 6 on the tongue
Birdsmouth seat cut length
3.5 in, level
Rise from plate line to ridge centerline
6 ft 0 in (72 in)
Rafters per side at 16 in
24
Total rafters
48
Ridge board length
30 ft

Shopping list

ItemBuyNotes
Rafter boards, 16 ft48 boardscut to 14 ft 5.6 in
Ridge board30 ft30 ft of stock lengths
How this was calculated
  1. Slope factor = square root of (1 + (6 / 12)^2) = 1.11803.
  2. Run = span / 2 - ridge / 2 = 288 / 2 - 1.5 / 2 = 143.25 in.
  3. Plate line to ridge cut = 143.25 x 1.11803 = 160.158 in.
  4. Tail = 12 x 1.11803 = 13.416 in.
  5. Total length = (143.25 + 12) x 1.11803 = 173.575 in = 14 ft 5.6 in.
  6. Angle = arctan(6 / 12) = 26.565 degrees. The plumb cut is 63.435 degrees from the board edge.
  7. Rafters per side = ceil(360 / 16) + 1 = 24, so 48 in all.
  • This is geometry only. It does not size rafters, check spans, uplift or snow loads, or choose connections. Use span tables from a recognized source or an engineer, and check your local code.
  • The length runs along the top edge from the plumb cut at the ridge to the plumb cut at the tail end. Birdsmouth depth, a square tail cut, fascia, collar ties and gable end framing change the cut list and are not included.
  • This is an estimate. Confirm quantities with your supplier and check local building codes and manufacturer instructions before you buy or build.

Calculated using SumPanda.com · https://sumpanda.com/rafter-length-calculator/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the rafter length calculator

  1. Enter the building span, measured from the outside of one wall to the outside of the opposite wall, and the pitch as the rise per 12 inches of run.
  2. Enter the overhang (horizontal distance past the wall), the ridge board thickness and the wall plate width. Pick inches or centimeters for those small sizes.
  3. Optionally enter the building length and choose the rafter spacing to get the number of rafters and the ridge board length.
  4. Read the total rafter length, the plumb and level cut angles, the framing square settings and the minimum stock length. Copy the cut list for the shop.

Formula

Slope factor = square root of (1 + (rise per 12 / 12)^2)

Run = span / 2 - ridge thickness / 2

Plate line to ridge cut = run x slope factor

Tail = horizontal overhang x slope factor

Total rafter length = (run + overhang) x slope factor

Level cut angle = arctan(rise per 12 / 12), plumb cut angle = 90 degrees - level cut angle

Rafters per side = ceil(building length / spacing) + 1

The length is measured along the top edge of the rafter, from the plumb cut at the ridge to the plumb cut at the end of the tail. The ridge deduction takes half the ridge thickness off each rafter, because each rafter stops at the face of the ridge board rather than its centerline.

Worked example: a 24 foot wide building with a 6/12 roof

The span is 24 ft = 288 inches, so half is 144 inches. A 1.5 inch ridge board takes off 0.75 inch, leaving a run of 143.25 inches.

The slope factor for a 6/12 pitch is the square root of 1.25 = 1.1180. From the plate line to the ridge cut the rafter is 143.25 x 1.1180 = 160.16 inches, or 13 ft 4.2 in.

A 12 inch overhang adds a tail of 12 x 1.1180 = 13.42 inches along the slope. The total is (143.25 + 12) x 1.1180 = 173.57 inches, which is 14 ft 5.6 in, so a 16 ft board is the shortest stock that works.

The angle is arctan(0.5) = 26.57 degrees, so the plumb cut is 63.43 degrees from the board edge. On a 30 ft long building at 16 inch spacing you need ceil(360 / 16) + 1 = 24 rafters per side, or 48 rafters.

What a common rafter is

A common rafter runs straight from the wall plate up to the ridge in a simple gable roof. All of its geometry comes from three numbers: the run, the pitch and the overhang. The run is the horizontal distance the rafter covers, and the pitch decides how much longer the sloped length is. Hip, valley and jack rafters follow related rules but need extra cuts, which this tool does not provide.

To check a pitch or convert between rise per 12, degrees and percent, use the roof pitch calculator. If you want shingles and bundles instead of lumber, the roofing calculator turns the same pitch into roof area.

Cut angles and the framing square

Two cuts matter on a common rafter: the plumb cut at the ridge and tail, which is vertical when the rafter is in place, and the level cut at the seat of the birdsmouth, which is horizontal when it is in place. Measured against the edge of the board, the level cut makes an angle equal to the pitch angle, and the plumb cut makes the complement, 90 degrees minus the pitch.

On a framing square you set 12 inches on the blade and the rise on the tongue. Marking along the tongue gives the plumb line and marking along the blade gives the level line. The birdsmouth seat length equals the width of the wall plate it sits on, which is why the tool asks for it.

Spans, loads and sizing

A rafter must also be strong enough for the load, the species and grade of lumber and its unsupported span. Those are separate from the length. Span tables from a recognized wood council, a lumber supplier or an engineer give the allowed span for a given size and spacing, and your local building code adds snow, wind and uplift requirements. This tool only calculates geometry and a lumber count.

Assumptions and limits

  • The roof is a simple gable with a single ridge board and rafters of equal length on each side. Hips, valleys and unequal pitches are not modeled.
  • The span is measured outside to outside of the walls, and the overhang is measured horizontally from the outside face of the wall.
  • The length is along the top edge between plumb cuts. A square-cut tail, a level fascia cut and the birdsmouth depth change the cut list slightly.
  • The rafter count puts one rafter at every spacing and one at the end. Gable end and barge rafters, collar ties and framing at openings are not counted.
  • Size, span, uplift and snow load are not checked. Use span tables or an engineer.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

How do I calculate the length of a common rafter?

Take half the span minus half the ridge thickness, add the overhang, and multiply by the slope factor. The slope factor is the square root of one plus the pitch fraction squared.

What is the ridge deduction for a rafter?

It is half the ridge board thickness, taken off the horizontal run, because each rafter meets the face of the ridge rather than its center. A 1.5 inch ridge reduces the run by 0.75 inch on each side.

What angle do I cut a rafter at?

The level cut is at the pitch angle from the board edge, and the plumb cut is 90 degrees minus that angle. A 6/12 roof has a 26.57 degree level cut and a 63.43 degree plumb cut.

What does 16 inches on center mean?

It means the centers of neighboring rafters are 16 inches apart. The count uses that spacing along the building length, plus one more rafter at the end.

Does this tell me what size lumber to use?

No. It only finds the length and cut angles. Use a span table or an engineer for the lumber size, spacing and connections for your loads.