Rafter Length Calculator
Calculate common rafter length, roof rise, pitch angle, overhang tail, and stock length from span, run, rise, or angle.
Estimate common rafter geometry and material length
A rafter length calculator uses the roof run and rise to find the sloped distance from the exterior wall line to the ridge. Enter roof span and pitch, run and rise, or run and angle to calculate common rafter length.
A rafter length calculator finds the diagonal rafter length using roof span and pitch. Calculate rafter length by dividing the building width by 2, then multiplying that run by the roof pitch factor. For a 12-foot run and 6:12 pitch, the rafter length is about 13.42 feet.
The calculator can deduct half the ridge-board thickness from a centered gable-roof run, convert a horizontal eave overhang into sloped tail length, and add a cutting allowance to estimate stock length.
This page calculates geometry and preliminary material quantities only. It does not size rafters, verify spans, design connections, calculate loads, approve birdsmouth cuts, or replace plans, building codes, manufacturer instructions, or structural engineering.
Stock length per rafter
----
Common rafter
--
Wall line to ridge face.
Horizontal run
--
--
Roof rise
--
Plate line to ridge elevation.
Sloped overhang tail
--
From horizontal overhang entered.
Roof pitch
--
Roof angle
--
Slope factor
--
Total material
--
Field-ready length reference
--
--
Rafter geometry breakdown
Shows the dimensions and formulas used in the estimate.
| Measure | Result | Method |
|---|---|---|
| Run the calculator to see the geometry breakdown. | ||
Framing note: The calculated line is not a cutting template. Confirm ridge, birdsmouth, fascia, subfascia, plumb cuts, seat cuts, bearing, lumber crown, and field dimensions before marking stock.
How to use the rafter length calculator
- Choose known measurements: Use full span and pitch for a centered gable, enter run with rise or angle, or use a known rafter length to solve a missing run or rise.
- Measure the run correctly: The common-rafter run normally ends at the ridge face, not the ridge centerline.
- Add the horizontal overhang: The calculator converts it to the longer sloped tail dimension.
- Refine optional settings: Adjust ridge thickness and cutting allowance, then enter a quantity or calculate it from roof length and on-center spacing.
- Verify before cutting: Compare the result with plans, field dimensions, lumber availability, and the framing layout.
Rafter length formulas
A common rafter, its horizontal run, and the roof rise form a right triangle. The Pythagorean theorem gives the line length before the eave tail.
Rafter length = √(run² + rise²)
Rise = run × pitch rise ÷ 12
Slope factor = √(1 + (pitch rise ÷ 12)²)
Run = √(rafter² − rise²)
Rise = √(rafter² − run²)
Example: a 24-foot centered gable span with a 1.5-inch ridge board leaves an 11.9375-foot run on each side. At a 6:12 pitch, the common rafter line is approximately 13.35 feet before adding an overhang or cutting allowance. The reverse modes use the same right-triangle geometry to recover a missing run or rise from a known common-rafter length.
Common roof pitch reference
Multiply horizontal run by the slope factor to estimate the common-rafter line. Values are rounded and do not include overhang or ridge deduction.
| Pitch | Angle | Slope factor | Rafter per 12 run |
|---|---|---|---|
| 2:12 | 9.46° | 1.0138 | 12.17 units |
| 4:12 | 18.43° | 1.0541 | 12.65 units |
| 6:12 | 26.57° | 1.1180 | 13.42 units |
| 8:12 | 33.69° | 1.2019 | 14.42 units |
| 10:12 | 39.81° | 1.3017 | 15.62 units |
| 12:12 | 45.00° | 1.4142 | 16.97 units |
Span, run, and ridge-board deduction
Full span
For a symmetrical gable roof, span is normally the horizontal distance across the building between the outside faces of supporting walls.
Rafter run
Run is half the span only when measured to the ridge centerline. A rafter ending at the ridge face has a slightly shorter run.
Ridge deduction
For opposing rafters against a centered ridge board, deduct half the board thickness from each centerline run before calculating length.
Rafter span and ridge-board reference: American Wood Council - Understanding Loads and Using Span Tables.
From calculated line to cut rafter
The mathematical line is useful for layout and material planning, but a finished rafter depends on the framing details at both ends.
At the ridge
Confirm ridge-board or ridge-beam thickness, plumb-cut location, opposing-rafter alignment, bearing, connectors, and any engineered detail.
At the wall and eave
Confirm birdsmouth position and depth, seat bearing, wall plate, subfascia, fascia, tail profile, soffit, and the horizontal versus sloped overhang dimension.
Roof-overhang framing reference: U.S. Department of Energy Building America Solution Center - Framing Gable Roof Overhangs.
What this calculator does not size
Rafter section
Member width, depth, species, grade, spacing, span, deflection, and notching limits require approved span tables or engineering.
Roof loads
Dead, live, snow, wind, seismic, drift, solar, ceiling, and concentrated loads are outside this geometry estimate.
Connections and restraint
Ridge support, rafter ties, ceiling joists, collar ties, uplift connectors, hangers, bearing, bracing, and load paths need project-specific design.
Roof-ceiling construction reference: International Code Council - 2024 IRC Chapter 8, Roof-Ceiling Construction.
How to estimate rafter quantity from roof length and spacing
The calculator can total material from a quantity you enter or calculate common-rafter positions from roof length and on-center spacing. For a simple gable roof with matching rafters on both sides, it counts positions along one side and doubles that result.
Rafters per side = ceiling(building length ÷ on-center spacing) + 1
Simple gable total = rafters per side × 2
| Building length | Spacing | Rafters per side | Two-side total |
|---|---|---|---|
| 20 ft | 16 in on center | 16 | 32 |
| 24 ft | 16 in on center | 19 | 38 |
| 30 ft | 24 in on center | 16 | 32 |
Choosing stock length and ordering extra rafters
Use the displayed stock length per rafter, not only the common-rafter line, when comparing lumber lengths. The stock must accommodate the sloped eave tail, ridge and fascia details, field adjustment, and the entered cutting allowance.
Round up to available stock
A required stock length of 15.52 feet generally needs a 16-foot piece, provided the remaining length is enough for the actual cuts and end quality. Never round down to a shorter board.
Check every usable end
Split ends, checks, wane, damage, crown, twist, knots, and trimming can reduce usable stock. Inspect lumber before relying on a small difference between calculated and purchased length.
Add spare pieces
For straightforward repetitive framing, one or two spare rafters may cover a bad board or cutting error. Complex roofs and uncertain material quality may justify a larger project-specific allowance.
Using the calculator for shed and asymmetric roofs
The full-span mode assumes a centered ridge and matching roof slopes. Use one of the run-based modes when the roof has only one plane or when the ridge is not centered.
Shed or mono-slope roof
Enter the complete horizontal run from the low bearing wall to the high bearing line, then add the vertical rise or roof angle. Do not divide the building width by two.
Asymmetric gable roof
Calculate each side separately using its actual wall-to-ridge-face run. If both sides meet the same ridge elevation, each run can produce a different pitch and rafter length.
Raised heel or offset bearing
Use the run and rise shown by the framing detail between the intended bearing and ridge references. Heel height, plate elevation, insulation clearance, and connector geometry can change the field layout.
Interesting Fact
Roofing contractors recorded 110 deaths from falls, slips, and trips in 2023, according to the U.S. Bureau of Labor Statistics. That represented 26% of construction-industry fatalities in this event category. Rafter layout and installation often place workers near open edges and on unfinished framing, so accurate geometry must be paired with proper access, planning, and fall protection. Source: U.S. Bureau of Labor Statistics - Fatal Falls in the Construction Industry in 2023.
Frequently Asked Questions
How do I calculate common rafter length?
Find the horizontal run and vertical rise, square both values, add them, and take the square root. This gives the sloped line from the wall plate reference to the ridge face before adding an eave overhang or cutting allowance. You can also derive the same result from the roof angle when that measurement is known.
Is roof run always half the building span?
Half the span reaches the ridge centerline on a symmetrical gable roof. If opposing rafters meet a ridge board, deduct half its thickness from each side so the calculated run ends at the ridge face. Verify the actual building measurement because asymmetric layouts and off-center ridges require a separate run for each side.
How does a 6:12 roof pitch affect rafter length?
A 6:12 pitch rises 6 units for every 12 units of horizontal run. Its slope factor is approximately 1.118, so each 12 feet of run creates about 13.42 feet of rafter line before ridge and overhang adjustments. Keep all inputs in one unit system; feet and inches may be used together only after conversion, while metric projects should use consistent meters or millimeters.
Do I enter horizontal or sloped overhang?
Enter the horizontal projection beyond the exterior wall line. The calculator multiplies that distance by the roof slope factor to estimate the longer rafter-tail line. Confirm the finished projection required by the roofing and fascia details before cutting stock.
Does the result include a birdsmouth cut?
No. A birdsmouth removes material but does not normally change the theoretical top-edge line used for this estimate. The seat cut provides bearing at the plate, while the adjoining plumb cut follows the rafter's incline. Their location, depth, bearing, and remaining member depth must follow the plans and accepted carpentry requirements.
Can this calculator size the rafter lumber or a roof truss?
No. Member sizing depends on species, grade, spacing, horizontal span, roof loads, deflection limits, notches, bearing, connections, and local code. A manufactured truss also relies on engineered webs, joints, and load assumptions that this tool does not evaluate. Use approved roof-framing tables, construction documents, or a qualified design professional.
Can I use this for a hip rafter, valley rafter, or jack rafter?
This version calculates a common rafter in a single roof plane. Hip, valley, and jack members involve additional plan-view geometry, offsets, shortening allowances, and connection details. Use calculations or drawings created for the specific roof design instead of treating the common-rafter result as a direct substitute.
Other useful calculators
Disclaimer: This rafter length calculator is for preliminary geometry, material estimating, budgeting, and general informational use only. It calculates theoretical common-rafter line length, run, rise, pitch, angle, slope factor, overhang tail, stock allowance, and total linear material from user-entered measurements.
It does not determine lumber species, grade, section size, spacing, structural span capacity, allowable deflection, bearing, connection strength, uplift resistance, ridge design, rafter ties, collar ties, ceiling joists, bracing, birdsmouth limits, notch limits, plumb-cut settings, load path, or compliance with building codes. It also does not calculate hip, valley, jack, cripple, or compound roof framing.
Actual dimensions can differ because of wall alignment, ridge location, ridge-board or beam thickness, plate height, framing tolerances, lumber crown, moisture, fascia and subfascia details, sheathing, roof assemblies, field cuts, and plan revisions. Verify all measurements on site and compare them with approved construction documents before ordering or cutting material.
Roof framing and work at height can cause serious injury, collapse, property damage, or death when performed incorrectly. Follow current plans, manufacturer instructions, local codes, permit requirements, and applicable workplace-safety rules. Consult a licensed design professional, building official, competent contractor, or qualified framing professional whenever structural adequacy or safe installation is uncertain.
Last updated: June 5, 2026