Free tool · Cut lengths, angles & birdsmouth
Rafter Length Calculator
This rafter length calculator gives you the cut length of a common rafter in feet, inches and sixteenths, with the ridge deduction and overhang tail included. It also lays out the plumb and seat cuts, checks your birdsmouth, and works out hip, valley and jack rafters, rafter count and ridge length.
- Span, rise or angle
- Feet-inch-sixteenths
- Birdsmouth check
- Hip & jack rafters
- Scale diagram
- Metric option
By Chowdhury, FixHomeCost editor · Last reviewed October 2026
1. Roof size and pitch
Pick what you know. Results update as you type.
2. Lumber and birdsmouth
Advanced options ridge, fascia, rakes, spacing, cuts
- Common rafter, total length
- –
- Rafter (ridge to wall)
- –
- Overhang tail
- –
- Board to buy
- –
- Pitch and angle
- –
- Plumb cut
- –
- Seat (level) cut
- –
- Total rise
- –
- Ridge board
- –
- Heel cut (plumb) height
- –
- Notch depth (square to edge)
- –
- Height above plate (HAP)
- –
- Rafter top at ridge
- –
3. Hip, valley and jack rafters
For a regular hip or valley, where both roofs have the same pitch and meet at 45° in plan.
- Hip or valley rafter
- –
- Hip plumb cut
- –
- Jack common difference
- –
- Jacks per side of each hip
- –
| Jack | Run from corner | Line length | With tail |
|---|
4. Rafter count and ridge
- Rafters to cut
- –
- Ridge length
- –
Show the full calculation step by step with your numbers
Lengths are measured along the top edge of the rafter. Results are rounded to the nearest 1/16 in (1 mm in metric). Rafter sizing for loads is not included.
Layout math only. This tool does not size rafters. Check the rafter span tables in IRC R802.4 or your local code, or ask an engineer, for the lumber size, grade and spacing your snow load and span need.
Cut one pattern rafter and test it on the building before you cut the rest. Nothing you enter is sent to us.
How to calculate rafter length
A common rafter is the sloped side of a right triangle. The run is the flat side, from the outside of the wall to the center of the ridge. The rise is how far the roof climbs over that run. The rafter is the long side. A rafter length calculator just solves that triangle and then adjusts it for the parts that real lumber has: a ridge board in the middle, an overhang at the bottom, and a notch where it sits on the wall.
- Find the run. For a gable or hip roof, it's half the building span. A 24-foot-wide house has a 12-foot run.
- Take off half the ridge. The rafters stop at the face of the ridge board, not its center. With a 1-1/2 inch ridge, take 3/4 inch off the run.
- Multiply by the pitch factor. The factor is √(1 + (pitch ÷ 12)²). For 6/12 it's 1.118. That gives the rafter length from the ridge plumb cut to the plumb line over the outside of the wall.
- Add the tail. Multiply the horizontal overhang by the same factor and add it.
- Buy long enough stock. A plumb-cut tail needs a little extra board, equal to the rafter depth times pitch ÷ 12. Then round up to the next standard length.
The calculator does all five steps at once and gives the answer in feet, inches and sixteenths, the way you'd read a tape. Switch to metric if your plans are in millimeters.
Rafter length formula with a worked example
Pitch factor = √(1 + (pitch ÷ 12)²)
Rafter = (span ÷ 2 − ridge ÷ 2) × factor
Tail = overhang × factor
Total = rafter + tail
Board needed = total + depth × pitch ÷ 12
Heel height = seat × pitch ÷ 12
Notch depth = seat × sin(angle)
HAP = depth ÷ cos(angle) − heel height
Worked example: a 24-foot span, 6/12 gable roof, 1-1/2 inch ridge board, 12-inch overhang, 2x8 rafters on a 2x4 wall. These are the calculator's defaults.
- Run: 24 ÷ 2 = 12 ft = 144 in. Minus 3/4 in for the ridge = 143.25 in.
- Factor for 6/12: √(1 + 0.25) = 1.118.
- Rafter: 143.25 × 1.118 = 160.16 in = 13' 4-3/16".
- Tail: 12 × 1.118 = 13.42 in = 1' 1-7/16". Total: 173.58 in = 14' 5-9/16".
- Board: 173.58 + 7.25 × 0.5 = 177.2 in, or 14.8 ft. Buy 16-foot 2x8s.
- Birdsmouth with a 3-1/2 inch seat: heel height 3.5 × 0.5 = 1-3/4 in. Notch depth 3.5 × 0.447 = 1.57 in, less than a third of 7.25 in (2.42 in), so it passes. HAP = 7.25 ÷ 0.894 − 1.75 = 6.36 in, about 6-3/8".
- Count: a 40-foot building at 16 in on center needs 480 ÷ 16 + 1 = 31 rafters per side, so 62 in all.
Plumb cuts, seat cuts and the birdsmouth cut
Every common rafter has two angled cuts at the top and a notch at the wall.
- Plumb cut: the vertical cut where the rafter meets the ridge. It's the same angle as the roof, 26.57° for 6/12. On a miter saw, set the miter to the roof angle.
- Seat (level) cut: the flat cut that sits on top of the wall plate. It's at 90° to the plumb cut.
- Heel cut: the short plumb cut of the birdsmouth that sits against the outside of the wall.
To mark them with a framing square, hold 12 on the body and the pitch number (6 for a 6/12 roof) on the tongue, both along the top edge of the board. Draw along the tongue for a plumb line and along the body for a level line. A speed square does the same job: pivot it on the "common" scale to the pitch number.
The birdsmouth cut is the notch that lets the rafter sit flat on the wall. Its seat is usually as wide as the wall plate: 3-1/2 inches on a 2x4 wall, 5-1/2 on a 2x6 wall. A common rule of thumb is to keep the notch no deeper than one third of the rafter depth, so enough wood stays above it to carry the load. Steep roofs and wide seats break that rule fast. A 2x8 on a 2x6 wall at 6/12 cuts 2.46 inches deep, more than a third of 7.25 inches. When that happens, shorten the seat (the IRC still needs at least 1-1/2 inches of bearing), use a deeper rafter, or ask your engineer about a heel detail. The calculator flags it and shows the longest seat that stays within a third.
HAP, height above plate, is the plumb distance from the top of the wall plate to the top edge of the rafter at the outside of the wall. Keep it the same on every rafter so the roof plane stays flat. It also sets how much room there is for insulation over the wall.
Rafter length per foot of run, by pitch
Multiply the run in feet by these numbers to get rafter length in inches. The hip column is for a regular hip or valley, measured per foot of common run.
| Pitch | Angle | Common per ft of run | Hip/valley per ft of run | Jack difference 16" / 24" |
|---|---|---|---|---|
| 3/12 | 14.04° | 12.37 in | 17.23 in | 16.49 / 24.74 in |
| 4/12 | 18.43° | 12.65 in | 17.44 in | 16.87 / 25.30 in |
| 5/12 | 22.62° | 13.00 in | 17.69 in | 17.33 / 26.00 in |
| 6/12 | 26.57° | 13.42 in | 18.00 in | 17.89 / 26.83 in |
| 7/12 | 30.26° | 13.89 in | 18.36 in | 18.52 / 27.78 in |
| 8/12 | 33.69° | 14.42 in | 18.76 in | 19.23 / 28.84 in |
| 9/12 | 36.87° | 15.00 in | 19.21 in | 20.00 / 30.00 in |
| 10/12 | 39.81° | 15.62 in | 19.70 in | 20.83 / 31.24 in |
| 12/12 | 45.00° | 16.97 in | 20.78 in | 22.63 / 33.94 in |
Example: a 6/12 rafter with a 12-foot run is 12 × 13.42 = 161 inches before the ridge deduction. That's 13' 5", which matches the theory. The calculator's 13' 4-3/16" is shorter because it takes off half the ridge.
Hip rafter length calculator: hips, valleys and jacks
A hip rafter runs diagonally from the corner of the building up to the ridge. In plan view it crosses the corner at 45°, so its run is longer: 16.97 inches for every 12 inches of common run (that's 12 × √2). It climbs the same height as the commons, so it has a lower slope. A 6/12 roof has hips at 6 in 16.97, about 19.5°.
Hip or valley length = common run (after ridge deduction) × √(2 + (pitch ÷ 12)²)
Jack common difference = spacing × pitch factor
For a 6/12 roof, √(2 + 0.25) = 1.5, so a 143.25-inch common run gives a hip of 214.88 inches, about 17' 10-7/8". Valley rafters on a roof with equal pitches use the same math. Mark the hip's plumb cut with 17 on the body of the framing square and the pitch on the tongue. The top end gets 45° side cuts (cheek cuts) to fit between the ridge and the commons.
Jack rafters run from the wall plate up to a hip, or from a valley up to the ridge. Each one is shorter than the last by the same amount, the common difference. At 16 inches on center on a 6/12 roof that's 17.89 inches. The table in the calculator lists every jack's theoretical length. Take off half the 45° thickness of the hip (about 1-1/16 inch measured level for a 1-1/2 inch hip) before you cut, and add the same tail as the commons.
For a hip roof, the ridge is shorter than the building: building length minus span, measured on the framing lines. A 40 by 24 foot hip roof has a 16-foot ridge.
Rafter size and span: what this calculator doesn't do
This is a layout tool. It tells you how long to cut a rafter, not whether that rafter is strong enough. Rafter size depends on span, spacing, lumber species and grade, roof dead load, snow load, and whether a ceiling is attached. The International Residential Code has span tables for this in section R802.4. Your local building department may have its own amendments, and many areas need an engineer for snow loads or long spans.
A few framing rules worth knowing before you cut:
- The ridge board must be at least as deep as the plumb cut on the rafter end (IRC R802.3). The calculator shows the plumb cut depth and the smallest board that covers it.
- Below a 3/12 pitch, the code treats ridges, hips and valleys as beams that must be designed, not plain boards.
- Rafters push outward on the walls. Ceiling joists or rafter ties keep the walls from spreading, unless you have a structural ridge beam.
- The longest common stock is usually 20 or 24 feet. If the board you need is longer, talk to your lumberyard about engineered lumber.
Once the frame is up, our roof square footage calculator and roofing shingles calculator work out the sheathing area and the shingle order.
Tips for cutting rafters
- Cut one pattern rafter first. Test it on both sides of the ridge at each end of the building. Walls are rarely perfectly straight or parallel.
- Crown up. Sight down each board and put the hump on top. The roof load will flatten it over time.
- Measure on the same line every time. Mark lengths along the top edge, from the long point of the plumb cut.
- Leave the tails long if you're unsure about the walls. Snap a line and cut them all at once after the rafters are set.
- Check the pitch first. If you're matching an existing roof, measure it with our roof pitch calculator, or convert an angle with the roof slope calculator.
Frequently asked questions
How do I calculate common rafter length?
Divide the span by 2 to get the run, subtract half the ridge thickness, and multiply by √(1 + (pitch ÷ 12)²). Then add the overhang times the same factor. For a 24-foot span at 6/12 with a 1-1/2 inch ridge and 12-inch overhang, that's 13' 4-3/16" plus a 1' 1-7/16" tail, or 14' 5-9/16" overall.
How long is a rafter for a 6/12 pitch?
About 13.42 inches for every foot of run, before the ridge deduction and tail. A 10-foot run needs a rafter of about 134 inches (11' 2"), and a 14-foot run about 188 inches (15' 8").
How deep should a birdsmouth cut be?
A common rule is no more than one third of the rafter depth, measured square to the edge. For a 2x8 (7-1/4 in) that's about 2-7/16 inches. The seat should still give at least 1-1/2 inches of bearing on the wall.
What is the ridge deduction?
Rafters stop at the face of the ridge board, not its center. So you take half the ridge thickness off the run, measured level. With a 1-1/2 inch ridge, that's 3/4 inch of run, or about 13/16 inch along a 6/12 rafter.
How do I calculate hip rafter length?
Multiply the common run by √(2 + (pitch ÷ 12)²). For a regular 6/12 hip that factor is exactly 1.5, so a 12-foot common run makes an 18-foot hip before deductions. Mark the plumb cut with 17 and 6 on the framing square.
How many rafters do I need?
Divide the building length in inches by the spacing and add one, then double it for a gable roof. A 40-foot building at 16 inches on center needs 31 per side, 62 total. At 24 inches it's 21 per side. Add rafters for gable overhangs, openings and doubled members.
What size rafters do I need?
It depends on span, spacing, lumber grade and your snow load. Use the rafter span tables in IRC R802.4 or your local code, or have an engineer size them. This calculator does the layout once you know the size.
Related tools and guides
This is general information, not a professional inspection. See how we research costs.