A rafter calculator finds the length of a sloped roof rafter from the building span, roof pitch and eave overhang. It halves the span to get the run, applies the pitch to find the rise, uses the Pythagorean theorem for the sloped length, adds the overhang, and returns the plumb and seat cut angles.
Rafter length
Calculations run in your browser. Inputs are not sent to our servers; anything you Save stays in this browser only.
Saved results (0)
How to Use This Calculator
Follow these steps to find the length of a common rafter and the angles you need to mark on the board.
- Enter the roof span in feet. This is the full width of the building from outside wall to outside wall, measured across the direction the rafters run.
- Select the roof pitch from 3/12 to 12/12. The first number is the rise in inches for every 12 inches of run.
- Enter the eave overhang in inches. This is the horizontal distance the rafter extends past the wall plate. Enter 0 for no overhang.
- Read the results. The rafter length, run, rise, plumb cut angle and seat cut angle update instantly, with a short note on the length.
| Result | What It Tells You |
|---|---|
| Rafter length | The sloped length of the rafter, including the overhang, before you choose a board length |
| Run | Half the span, the horizontal distance from the wall to the ridge |
| Rise | The vertical height from the top of the wall plate to the ridge |
| Plumb cut angle | The angle of the vertical cut at the ridge and the tail, measured from the rafter edge |
| Seat cut angle | The angle of the horizontal cut where the rafter sits on the wall plate |
The result is a theoretical length measured along the top edge of the rafter. Allow for the ridge board, the birdsmouth and the saw kerf when you cut real lumber.
What Is a Rafter?
A rafter is a sloped framing member that runs from the top of an exterior wall up to the ridge of a roof. Rafters carry the roof sheathing, the roofing material and the loads placed on them, such as snow and wind, and pass those loads down to the walls. In a conventionally framed roof, pairs of rafters meet at a ridge board or ridge beam and are spaced evenly along the length of the building.
Several rafter types appear on a typical roof. Common rafters run straight from the wall plate to the ridge, and they are the type this calculator sizes. Hip and valley rafters run diagonally where roof planes meet, and they are longer than common rafters for the same run. Jack rafters are short members that fill in between a hip or valley and the wall or ridge.
Knowing the exact rafter length matters because every board is cut to a layout. A rafter that is too short leaves a gap at the ridge or a short overhang. A rafter that is too long wastes lumber and may need recutting. Getting the length and the two cut angles right before you cut saves time and material.
How the Rafter Calculation Works
A roof section forms a right triangle. The run is the horizontal side, the rise is the vertical side and the rafter is the sloped side, called the hypotenuse. The pitch tells you how steep the slope is, so it links the rise to the run. The calculator finds the run and rise, then uses the Pythagorean theorem to find the sloped length and adds the overhang.
Step by step:
- The run is half the span, because the ridge sits at the center of a symmetrical gable roof.
- The rise is the run multiplied by the pitch divided by 12. A 6/12 pitch rises 6 in for every 12 in of run, so the rise is half the run.
- The sloped length comes from the square root of run squared plus rise squared.
- The overhang is converted from inches to feet and added to the sloped length.
- The plumb cut angle is the arctangent of the pitch divided by 12. The seat cut angle is 90 degrees minus the plumb cut angle.
Assumptions: a symmetrical gable roof, a common rafter, a level wall plate and an overhang measured horizontally. The calculator reports a length along the top edge of the rafter and does not subtract the ridge board thickness.
Worked Example
A building 20 ft wide with a 6/12 roof pitch and a 12 in eave overhang:
- Run: 20 / 2 = 10 ft
- Rise: 10 x (6 / 12) = 5 ft
- Sloped length before the overhang: the square root of (10 x 10 + 5 x 5) = the square root of 125 = 11.18 ft
- Overhang: 12 in / 12 = 1.00 ft
- Rafter length: 11.18 + 1.00 = 12.18 ft
- Plumb cut angle: arctan(6 / 12) = arctan(0.5) = 26.6 degrees
- Seat cut angle: 90 – 26.6 = 63.4 degrees
The rafter needs about 12.18 ft of length, so you would start with a board of at least 13 ft or longer stock sized to your supplier lengths. Always check the result against a full-size layout before cutting the first rafter.
Factors That Change Your Result
Roof Span
The span sets the run, and the rafter grows in direct proportion to it. Doubling the span doubles the run, the rise and the sloped length for the same pitch.
Roof Pitch
A steeper pitch raises the rise and lengthens the rafter for the same span. At 12/12 the rise equals the run and the sloped length is about 1.41 times the run. At 3/12 the sloped length is only about 1.03 times the run.
Eave Overhang
The overhang is added to the length. This calculator treats the overhang you enter as a horizontal distance but adds it directly, so it gives a slightly short result for a long overhang on a steep roof. Treat the figure as a planning length and confirm it on a layout.
Ridge Board Thickness
When rafters meet at a ridge board, half the ridge thickness is usually deducted from each rafter. The calculator does not make this deduction, so subtract it yourself when your design uses a ridge board.
Birdsmouth Cut
The birdsmouth is a notch that lets the rafter sit on the wall plate. It does not change the overall length along the top edge, but it removes material from the bottom edge, so the depth is limited by the width of the rafter.
Wall Height and Plate Position
Rafter length is measured from the outside edge of the wall plate. If the walls are out of level or the plate is set back from the outside face, the real rafter length shifts. Measure the building after the walls are framed.
Rafter vs Truss Comparison
| Feature | Stick-Framed Rafters | Roof Trusses |
|---|---|---|
| How it is built | Rafters are cut and assembled on site one at a time | Triangulated frames are built in a factory and lifted into place |
| Design | Sized from span tables or by an engineer | Engineered for the specific span and loads |
| Attic or vaulted space | Open space is easier to keep under the roof | Web members usually fill the space |
| Interior support | May need a ridge beam, collar ties or ceiling joists to resist spreading | Often clear-span between the exterior walls |
| Site labor | More cutting and layout time on site | Less cutting, but a crane or lift is often needed |
| Changes on site | Easier to adjust a layout in the field | Harder to alter, and changes need engineering approval |
| Where this calculator helps | Gives the rafter length and cut angles | Not used for truss members |
Cost depends on the lumber size and grade, the span, labor rates and the delivery of trusses, so no price is stated here. Get written quotes for both methods if you are deciding between them, and ask a framing contractor which approach suits your span and roof shape.
When to Use a Rafter Calculator
Planning a New Roof Frame
Use a rafter calculator before you order lumber. The length tells you which board lengths to buy and how many pieces you need to cut for each side of the roof.
Building a Shed, Garage or Porch
Small gable structures are a common use case. A quick calculation gives the rafter length and cut angles so you can build a pattern rafter and trace it for the rest.
Comparing Roof Pitches
Change the pitch from 4/12 to 8/12 and watch the length change. This shows how much extra lumber and roofing material a steeper roof needs.
Checking a Plan or Quote
If a plan or contractor lists a rafter length, compare it with your own figure. A large gap is worth a question about the overhang, the ridge allowance or the pitch used.
Setting Up Cut Angles
The plumb and seat angles help you set a speed square, a miter saw or a framing square. Use a speed square and a pattern rafter to confirm the angles before you cut the full set.
Common Mistakes
Using the Roof Length Instead of the Span
Enter the width of the building across the rafter direction. Do not enter the length of the ridge, which runs the other way.
Forgetting the Overhang
Leaving the overhang out gives a rafter that ends at the wall plate. Add the overhang you want at the eave, or enter 0 if there is none.
Mixing Pitch and Angle
A 6/12 pitch is not a 6 degree slope. It is about 26.6 degrees. Enter the pitch ratio in this tool and use the angle results for your saw settings.
Ignoring the Ridge Board
Without a deduction for half the ridge board thickness, each rafter will be a little long. Subtract it when your design uses a ridge board.
Treating the Length as a Structural Check
This tool gives geometry, not strength. A rafter that fits the length may still be too small for the span and load. Confirm the size with span tables, the local code or a qualified professional.
Measuring Rafter Length Without a Layout Check
Always cut one pattern rafter and test it in place. Walls are rarely perfectly square, and a trial fit catches errors before you cut the full set.
Accuracy and Limitations
This calculator applies standard right-triangle geometry, so the numbers are exact for the inputs you enter. The limits come from the simplified roof model, not from the arithmetic.
What it covers
- Common rafter length from span, pitch and overhang
- Run and rise for a symmetrical gable roof
- Plumb cut and seat cut angles in degrees
- Pitches from 3/12 to 12/12
- Overhang entered in inches
What it does not cover
- Rafter size, grade, species or load capacity
- Hip, valley and jack rafters
- Ridge board deduction and birdsmouth depth
- Asymmetrical or shed roofs
- Local code, snow load or wind requirements
How We Calculate the Result
Frequently Asked Questions
How do you calculate rafter length?
Halve the building span to get the run, multiply the run by the pitch over 12 to get the rise, take the square root of run squared plus rise squared, then add the overhang. For a 20 ft span at 6/12 with a 12 in overhang the length is 12.18 ft.
What is the run of a rafter?
The run is the horizontal distance from the outside of the wall to the center of the ridge. On a symmetrical gable roof it equals half the building span.
What does a 6/12 roof pitch mean?
It means the roof rises 6 inches for every 12 inches of horizontal run. The slope angle is about 26.6 degrees.
What is a plumb cut on a rafter?
The plumb cut is the vertical cut at the top of the rafter where it meets the ridge, and at the tail end. Its angle is the arctangent of the pitch over 12 measured from the rafter edge.
What is a seat cut on a rafter?
The seat cut is the horizontal cut of the birdsmouth that sits on top of the wall plate. Its angle is 90 degrees minus the plumb cut angle.
Does the rafter length include the overhang?
Yes. This calculator adds the overhang you enter to the sloped length, so the result runs from the ridge to the tail of the eave.
Should I subtract the ridge board thickness?
Yes, if your design uses a ridge board. Rafters are usually shortened by half the ridge thickness, and this calculator does not apply that deduction, so subtract it yourself.
Can I use this calculator for hip or valley rafters?
No. Hip and valley rafters run diagonally and are longer than common rafters for the same run. This tool is for common rafters on a gable roof.
Does this tell me what size lumber to use?
No. Lumber size depends on span, spacing, grade, species and loads. Use span tables from the American Wood Council, your local code or a qualified professional to choose a size.
How accurate is the rafter length?
The arithmetic is exact for the numbers you enter. Real roofs vary because of wall out-of-square, ridge board thickness and the birdsmouth, so test a pattern rafter before cutting the full set.
Sources
- IRC R802 Roof Framing Requirements (International Code Council, 2021 IRC).
- AWC Span Tables for Joists and Rafters (American Wood Council).
- Fine Homebuilding Roof Framing Geometry (Taunton Press).
Related Calculators
Looking for more framing tools?
Explore all framing calculatorsThis calculator estimates rafter length, run, rise, plumb cut angle and seat cut angle from the roof span, pitch and overhang you enter. It uses standard right-triangle geometry and does not account for load capacity, lumber grade, species or local code requirements. Always confirm rafter size and span with your local building code and a qualified professional. Spotted an error? Let us know.