Rafter Length Calculator

Calculate common gable-rafter line length from building span or horizontal run and roof pitch. Optionally account for ridge thickness and a horizontal eave overhang without mixing structural span, roof rise and sloped board length.

For a symmetrical gable, the theoretical run starts as one-half of this span.
Enter the horizontal projection from the wall bearing reference to the ridge reference, before any optional ridge adjustment below.
A 6:12 roof rises 6 units vertically for every 12 units horizontally.
Percent slope = rise ÷ run × 100.
These two values define the roof slope only; they do not replace the span/run dimension above.
Optional ridge, overhang & stock allowance

These values are explicit adjustments. Leave them blank for zero. The overhang is entered horizontally, while stock allowance is added along the rafter line.

Half the thickness is removed from one rafter's horizontal run when the original dimension reaches the ridge centerline.
Enter horizontal projection from wall reference to tail plumb line—not the already-sloped tail length.
Useful if you intentionally cut tails or ridge ends long. This is purchasing/cutting allowance, not roof geometry.

Your Rafter Geometry

Adjusted Horizontal Run0
Rise to Ridge0
Roof Angle0
Rafter Length0

Enter a span/run and roof pitch. The blue card shows the sloped common-rafter line length including optional horizontal overhang and stock allowance.

Calculation breakdown

Base horizontal run0
Half-ridge deduction0
Structural run to ridge face0
Horizontal overhang0
Roof pitch0
Slope factor0
Rise at wall-to-ridge run0
Rafter line before stock allowance0
Extra stock allowance0
Final rafter length0

Transparent formula

For a symmetrical gable: base run = full span ÷ 2. If a ridge thickness is entered, structural run = base run − ridge thickness ÷ 2.

Rafter line = (structural run + horizontal overhang) × √(1 + slope²).

For X:12 pitch, slope = X ÷ 12. Rise to ridge = structural run × slope. Optional stock allowance is added along the sloped rafter after the geometry is calculated.

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.

  1. Choose US customary or metric units. Mixed input units are supported inside the selected system.
  2. Enter full span or one-side run. For a symmetrical gable, full span becomes half-span run.
  3. Choose how you know the roof pitch. Use X:12, angle in degrees, percent slope, or a known rise/run pair.
  4. Add ridge thickness when your span/run reaches the ridge centerline. The calculator removes half that thickness from one rafter's run.
  5. Add eave overhang as a horizontal projection. The calculator converts it to sloped tail length with the same roof factor.
  6. Add stock allowance only if you intentionally want extra board length. It is added after the geometric rafter line is known.
Primary result: the blue Rafter Length is the sloped line from the ridge-side reference to the tail plumb-line reference, including any overhang and optional stock allowance you entered. It is not an automatic birdsmouth cut layout or structural sizing result.

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:

Using rise and runRafter line = √(Run² + Rise²) Using roof angleRafter line = Run ÷ cos(Angle) Using slope ratioSlope factor = √(1 + Slope²) Rafter line = Horizontal projection × Slope factor

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 formatMeaningExample equivalent
Rise per 12Vertical rise for 12 units horizontal run6:12
Slope ratioRise ÷ run0.5
Percent slopeRise ÷ run × 10050%
Anglearctan(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.

Structural run to ridge face = Half span − Half ridge thickness

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.

Sloped tail length = Horizontal overhang × Slope factor Total geometric rafter line = (Structural run + Horizontal overhang) × Slope factor

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.

Use two separate checks: first calculate geometry and cut length; then verify rafter member size, spacing, connections and allowable horizontal span using the applicable code tables, AWC resources, engineered design or local requirements.

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

24 ft span, 6:12 pitch

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.

Add a 1½ in ridge

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.

Add a 24 in overhang

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

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.

Important note: This Rafter Length Calculator is a geometry and planning tool, not a structural roof-framing design. Actual cut length and allowable construction can change with ridge detail, bearing location, birdsmouth/seat cut, heel height, fascia profile, eave treatment, lumber dimensions, rafter ties, collar ties, purlins, snow and wind loads, species/grade, member spacing and local code requirements. Verify the framing plan, allowable horizontal span, member size, connections, notches and roof-covering slope requirements before cutting or building. Engineered wood products must follow their manufacturer's cutting and installation instructions.