Rafter Length Calculator for Common Gable Roof Rafters
A reliable rafter calculator must keep several measurements separate: the building span, the one-side horizontal run, the roof rise, the sloped common-rafter line, the ridge-board adjustment and any eave overhang. Mixing those measurements is one of the fastest ways to end up with a rafter that is too long or too short. This calculator exposes each stage so you can see exactly which dimension is being used.
How to Use the Rafter Length Calculator
Start by deciding what horizontal dimension you actually know. If you have the full width between the supporting wall references of a symmetrical gable roof, choose Full building / roof span. The calculator divides that dimension by two to obtain the theoretical one-side run. If you already know the one-side horizontal run, choose One-side horizontal run instead.
- Choose US customary or metric units. Mixed input units are supported inside the selected system.
- Enter full span or one-side run. For a symmetrical gable, full span becomes half-span run.
- Choose how you know the roof pitch. Use X:12, angle in degrees, percent slope, or a known rise/run pair.
- Add ridge thickness when your span/run reaches the ridge centerline. The calculator removes half that thickness from one rafter's run.
- Add eave overhang as a horizontal projection. The calculator converts it to sloped tail length with the same roof factor.
- Add stock allowance only if you intentionally want extra board length. It is added after the geometric rafter line is known.
Rafter Length Formula
A common rafter in a simple gable forms the hypotenuse of a right triangle. The horizontal run is the adjacent side, the roof rise is the opposite side, and the rafter line is the hypotenuse. The Pythagorean theorem therefore gives the fundamental relationship:
For a roof described as X:12, slope is X ÷ 12. A 6:12 roof therefore has a slope of 0.5. Its slope factor is √(1 + 0.5²) ≈ 1.1180. Every 1 foot of horizontal run corresponds to about 1.118 feet of rafter line.
The same method works in metric because slope is dimensionless. A roof that rises 500 mm over 1000 mm of run also has slope 0.5, a 26.565° angle and the same 1.1180 slope factor.
Building Span, Rafter Run and Rafter Span Are Not the Same Thing
Building or roof span is the total horizontal distance across the structure between the support references used for the roof geometry. For a symmetrical gable, the centerline ridge divides that span into two equal theoretical runs.
Rafter run is the horizontal projection for one side of the roof. If the total span is 24 ft, the centerline run is 12 ft before any ridge-board thickness adjustment.
Rafter length is the sloped line. It is always longer than the horizontal run for a roof with positive pitch.
There is another important use of the word span in building codes and structural span tables. The International Residential Code specifies that rafter spans are measured along the horizontal projection of the rafter. That means a 13 ft sloped rafter may have a structural span considerably shorter than 13 ft. Never compare the blue sloped-length result directly with a span-table limit that is defined horizontally.
Roof Pitch: X:12, Degrees, Percent Slope and Rise/Run
Roof pitch is commonly expressed in several ways. They describe the same slope but are not numerically interchangeable.
| Pitch format | Meaning | Example equivalent |
|---|---|---|
| Rise per 12 | Vertical rise for 12 units horizontal run | 6:12 |
| Slope ratio | Rise ÷ run | 0.5 |
| Percent slope | Rise ÷ run × 100 | 50% |
| Angle | arctan(rise ÷ run) | 26.565° |
A 12:12 roof is not a 12° roof. A 12:12 pitch means rise equals run, producing a 45° angle and a 100% slope. The calculator lets you enter the format you actually have and converts it internally to one slope ratio before doing the length math.
How Ridge Board or Ridge Beam Thickness Changes Rafter Length
When a symmetrical roof is laid out from the building centerline, the theoretical half-span reaches the center of the ridge. A common rafter, however, typically terminates at the face of the ridge board or beam. A practical geometric adjustment is therefore to subtract half the ridge thickness from the one-side horizontal run.
For example, a 24 ft full span gives a 12 ft centerline run. With a 1½ in ridge board, subtract ¾ in horizontally. The adjusted run becomes 11 ft 11¼ in before overhang. MyCarpentry's framing guidance describes this same half-ridge adjustment when calculations begin at the ridge centerline, and Inch Calculator similarly subtracts half beam width from one-side run.
Do not apply this automatically if your field measurement already ends at the ridge face. The input label matters: if the run you measured already represents the actual horizontal distance from bearing point to ridge face, entering ridge thickness again would shorten the rafter twice.
Eave Overhang, Rafter Tail and Stock Length
An eave overhang is often measured horizontally from the wall reference to the fascia or tail plumb-line location. The rafter tail itself is sloped, so a 24 in horizontal overhang on a 6:12 roof is longer than 24 in along the rafter.
This calculator asks for the horizontal overhang because it combines cleanly with run geometry. If your plan instead gives an already-sloped tail length, convert it to horizontal projection first or leave the overhang blank and add the known sloped amount as stock allowance only when that matches your cutting reference.
Stock allowance is intentionally separate. Framers sometimes leave rafter tails long and snap/cut the final fascia line later. Extra ridge-end material may also be helpful for layout. That extra lumber is not part of the theoretical roof triangle, so the calculator adds it after the rafter line rather than pretending it changes pitch or rise.
Birdsmouth Cuts: What the Calculator Does and Does Not Calculate
The birdsmouth is the seat-and-heel notch that allows a sawn-lumber rafter to bear on the wall plate. Its layout depends on the wall position, plate width, roof pitch, desired heel height, rafter depth, fascia/eave geometry and applicable notch limits. The blue rafter-length answer does not automatically provide birdsmouth seat-cut dimensions.
This separation is intentional. A length calculator can solve roof geometry from a few measurements; safe notch geometry needs the actual member and bearing detail. The IRC limits cuts, holes and notches in sawn-lumber rafters through its roof-framing provisions and applies specific rules to cantilevered rafter portions. Engineered wood products such as I-joists and structural composite lumber have even stricter manufacturer-specific cutting rules.
Do not use a generic birdsmouth percentage from an online calculator without checking the rafter material, design and local code. The rafter may be geometrically long enough and still be structurally unacceptable if the notch removes too much section or does not provide adequate bearing.
Rafter Length Is Not Rafter Sizing
This calculator tells you geometric length. It does not tell you whether a 2×4, 2×6, 2×8 or another member is strong enough. Allowable rafter size and spacing depend on lumber species and grade, dead load, roof live load or snow load, spacing, horizontal span, support conditions, ceiling attachment and other factors.
The IRC rafter span tables are organized by species/grade, rafter spacing and loads, and they measure span along the horizontal projection. American Wood Council guidance likewise treats rafter structural capacity separately from geometric line length. A longer piece of lumber is not automatically a stronger or code-compliant rafter.
Low-Slope Roofs Need More Than a Geometry Calculation
The geometry formulas work even at very low slopes, but structural and roofing requirements can change. The 2021 IRC states that where roof pitch is less than 3:12, structural members supporting rafters such as ridges, hips and valleys must be designed as beams, with bearing provided for the rafters. Roof-covering minimum slopes also vary by material and manufacturer instructions.
Therefore a mathematically valid 1:12 or 2:12 result does not mean a conventional ridge-board framing arrangement or a particular roof covering is permitted. Geometry is only one part of the roof system.
Worked Rafter Length Examples
Half-span run = 12 ft. With no ridge adjustment or overhang, rise = 12 × 6/12 = 6 ft. Rafter line = √(12² + 6²) = about 13.416 ft, or approximately 13 ft 5 in.
Subtract ¾ in horizontally from the 12 ft centerline run. Structural run becomes 11 ft 11¼ in. On a 6:12 roof, the line to the ridge face becomes about 13.346 ft.
A 2 ft horizontal tail on a 6:12 roof has a sloped length of 2 × 1.1180 ≈ 2.236 ft. Add that to the ridge-to-wall line for the full ridge-to-tail plumb-line distance.
Metric example: 7.2 m span at 30°
A symmetrical 7.2 m span gives a 3.6 m theoretical run. At 30°, the rafter factor is 1 ÷ cos(30°) ≈ 1.1547. Without ridge adjustment or overhang, rafter line = 3.6 × 1.1547 ≈ 4.157 m. The rise is 3.6 × tan(30°) ≈ 2.078 m.
Percent-slope example
A 40% roof slope means rise/run = 0.40. The angle is arctan(0.40) ≈ 21.801°. The slope factor is √(1 + 0.40²) ≈ 1.0770. A 5 m horizontal run therefore produces about 5.385 m of sloped rafter line before overhang or stock allowance.
Common Rafter Length Calculation Mistakes
- Using full building span as one rafter's run. A symmetrical gable normally starts from half the span.
- Confusing rafter length with code span. Structural rafter span tables commonly use horizontal projection.
- Calling 6:12 “6 degrees.” A 6:12 roof is about 26.565°, not 6°.
- Ignoring ridge thickness when measuring to centerline. One rafter usually ends at the ridge face, not through the ridge center.
- Subtracting ridge thickness twice. Do not use the adjustment if your measured run already ends at the ridge face.
- Entering sloped overhang as horizontal overhang. Those are different lengths on a pitched roof.
- Adding horizontal overhang directly to sloped rafter length. Convert horizontal overhang through the slope factor.
- Treating theoretical line length as finished board-cut length. Tail profiles, ridge cuts, birdsmouth layout and field trimming can change stock requirements.
- Using geometric length to choose lumber size. Structural sizing depends on span, loads, species, grade and spacing.
- Notching engineered rafters like sawn lumber. Engineered wood products require manufacturer-specific cutting rules.
Research Basis and Competitor Improvements
The calculator's geometry was checked against standard right-triangle relationships and current construction references. International Residential Code roof-framing provisions distinguish horizontal rafter span from sloped rafter length and include specific requirements for ridge conditions, low-slope framing, bearing, cutting and notching. American Wood Council material further reinforces that structural rafter selection is a separate problem from geometric line length.
Competitor research included Inch Calculator, Omni Calculator and MyCarpentry. Inch Calculator provides building width, overhang, beam width and pitch; Omni supports run with rise or pitch; MyCarpentry clearly distinguishes rafter line length from actual end-to-end stock and explains the half-ridge correction. This SonoCalculator version combines the strongest ideas while improving transparency: users can enter full span or one-side run, choose four pitch formats, see the half-ridge deduction explicitly, enter overhang as horizontal projection, and keep stock allowance separate from roof geometry.
The result cards also prioritize the answer most users need—rafter length—while keeping adjusted horizontal run, rise and angle visible so the calculation can be checked without opening another tool.
Rafter Length Calculator FAQs
How do I calculate rafter length from roof span?
For a symmetrical gable, divide the full span by two to get the centerline run. Adjust for half the ridge thickness if appropriate, determine roof rise from pitch, then use the Pythagorean theorem or multiply horizontal run by the roof slope factor.
What is the formula for a 6:12 rafter?
A 6:12 roof has slope 0.5 and slope factor √(1 + 0.5²) ≈ 1.1180. Multiply the applicable horizontal run by 1.1180 to get the sloped line length before any separately added stock allowance.
Do I subtract the ridge-board thickness?
If your original span/run reaches the ridge centerline and the rafter ends at the ridge face, subtract half the ridge thickness from one-side horizontal run. If your measurement already ends at the ridge face, do not subtract it again.
Does overhang increase rafter length?
Yes. Enter the overhang as its horizontal projection and the calculator converts it to sloped tail length using the same roof slope factor.
Is rafter length the same as rafter span?
No. In structural span tables, rafter span is commonly measured as horizontal projection. Rafter length is the sloped distance along the member.
Can I use degrees instead of X:12 pitch?
Yes. The calculator accepts degrees, percent slope, rise per 12, or a known rise/run pair and converts them internally to a common slope ratio.
Does this calculator lay out the birdsmouth?
No. Birdsmouth geometry depends on rafter depth, plate and bearing details, heel height and notch limits. This tool calculates line length and roof geometry, not a universal notch design.
Can this calculator size the rafter lumber?
No. Lumber size and spacing depend on horizontal span, species, grade, dead/live/snow loads, support conditions and applicable code or engineered design.
Why is Rafter Length the blue result?
It is the direct answer the user came to calculate. The supporting cards expose adjusted run, rise and angle so the result can be independently checked.