Rafter Length Calculator
Calculate rafter length accurately for your build. Get material quantities, waste allowances, and project cost breakdowns.
Rafter Length Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: Rafter = sqrt(Runยฒ + Riseยฒ) - Shortening + Tail
Worked example โ Total rafter = 14 ft 5 9/16 in (buy 16 ft lumber)
Formula
Rafter = sqrt(Runยฒ + Riseยฒ) - Shortening + Tail
The run is half the building width. The rise equals run times pitch divided by 12. The rafter line length is the hypotenuse of the run-rise right triangle. Subtract the ridge shortening (half ridge thickness along the slope). Add the tail length (overhang divided by cosine of roof angle) to get the total rafter length including overhang.
Worked Examples
Example 1: 24-ft Wide House, 6/12 Pitch
Problem:Calculate rafter length for a 24 ft wide building with 6/12 pitch, 12 inch overhang, and 1.5 inch ridge board.
Solution:Run = 24/2 = 12 ft Rise = 12 x (6/12) = 6 ft Line length = sqrt(144 + 36) = 13.416 ft Shortening = (0.75/12) / cos(26.57) = 0.070 ft Tail = (12/12) / cos(26.57) = 1.118 ft Total = 13.416 - 0.070 + 1.118 = 14.464 ft
Result:Total rafter = 14 ft 5 9/16 in (buy 16 ft lumber)
Example 2: 30-ft Wide Garage, 4/12 Pitch
Problem:Calculate for 30 ft wide, 4/12 pitch, 18 inch overhang, 1.5 inch ridge.
Solution:Run = 15 ft, Rise = 5 ft Line length = sqrt(225 + 25) = 15.811 ft Shortening = 0.066 ft Tail = 1.5 / cos(18.43) = 1.581 ft Total = 15.811 - 0.066 + 1.581 = 17.326 ft
Result:Total rafter = 17 ft 3 15/16 in (buy 18 ft lumber)
Frequently Asked Questions
How do I calculate rafter length from building width and pitch?
Divide the building width by 2 to get the run (horizontal distance from the outside wall to the center of the ridge). Multiply the run by the pitch ratio (rise per 12 inches of run divided by 12) to get the total rise. The rafter line length is the hypotenuse: square root of (run squared plus rise squared). Then subtract the shortening at the ridge (half the ridge board thickness divided by cosine of the roof angle) and add the tail length for any overhang. The tail length equals the overhang distance divided by cosine of the roof angle.
What is the rafter shortening at the ridge?
When rafters meet at a ridge board, they do not extend all the way to the centerline of the building. Each rafter must be shortened by half the thickness of the ridge board, measured horizontally. For a standard 2x ridge board (1.5 inches actual), each rafter is shortened by 0.75 inches measured horizontally. This horizontal dimension must be converted along the rafter slope by dividing by the cosine of the roof angle. For a 6/12 pitch, the shortening along the rafter is 0.75 / cos(26.57) = 0.839 inches.
What is the pitch multiplier and how is it used?
The pitch multiplier (also called the rafter factor) converts horizontal run distance to actual rafter length along the slope. It equals 1 divided by cosine of the roof angle, or equivalently the square root of (1 plus the pitch ratio squared). For a 6/12 pitch, the multiplier is 1.118, meaning for every foot of horizontal run, the rafter is 1.118 feet long. To find the rafter line length, simply multiply the run by the pitch multiplier. Common multipliers are 1.054 for 4/12, 1.118 for 6/12, 1.202 for 8/12, and 1.414 for 12/12.
How do I determine what lumber length to buy for my rafters?
Calculate the total rafter length including the tail (overhang) and round up to the next standard lumber length. Standard dimensional lumber comes in 8, 10, 12, 14, 16, 18, and 20 foot lengths. Add 6 to 12 inches to your calculated length for trimming and cutting waste. For example, if your total rafter length calculates to 13 feet 4 inches, purchase 14-foot boards. For longer rafters, some lumberyards stock 22 and 24 foot lengths, but these may need to be special ordered and are more expensive per board foot.
What is the difference between a common rafter, a hip rafter, and a jack rafter?
A common rafter runs square from the wall plate to the ridge, and its run is half the building width. A hip rafter runs diagonally at 45 degrees in plan, so for every 12 units of common run it travels about 16.97 units horizontally, which makes it longer and shallower in apparent pitch. Jack rafters run from the plate to the hip and shorten by a constant amount, the common difference, which is set by the rafter spacing and the pitch.
How is the birdsmouth laid out, and how deep can it be cut?
The birdsmouth is the notch that seats the rafter on the top plate. It combines a level seat cut bearing on the plate width with a plumb heel cut against the outer face. Layout follows from the roof angle, with the plumb cut marked at the roof angle from vertical and the seat cut at the same angle from horizontal. Conventional framing practice limits the notch so that a substantial majority of the rafter depth remains uncut above the seat.
How do the plumb cut and seat cut angles follow from the roof pitch?
The roof angle is the arctangent of rise over run, so a 6 in 12 pitch gives the arctangent of 0.5, which is 26.57 degrees. Once the rafter is in place the ridge cut stands truly plumb and the seat cut lies truly level, and the two are square to each other. What varies with pitch is how they are marked on the stock: measured from a line squared across the rafter, the plumb cut sits 26.57 degrees off square and the seat cut sits at its complement, 63.43 degrees. Swapping those two is a frequent source of miscut rafters.
What is the difference between roof pitch and roof slope?
In North American framing, slope is written as rise per 12 units of run, such as 6 in 12, and that is what rafter tables and speed squares use. Pitch in its strict traditional sense is rise divided by the full span, so a 6 in 12 slope on a symmetric roof is a pitch of one quarter. The two terms are used interchangeably in conversation, so confirm which convention a drawing means before cutting anything.
What determines how far a rafter can span?
Span capacity depends on the lumber species and grade, the member depth, the on-centre spacing, and the design loads, which include dead load plus snow or live load for the location. Deeper members gain capacity quickly because bending stiffness rises with the cube of depth, and tightening spacing from 24 to 16 inches on centre spreads load over more members. Published span tables for the applicable code combine all of these; Rafter Length Calculator gives geometry, not capacity.
What is the difference between a ridge board and a structural ridge beam?
A ridge board is a non-structural nailing surface. Opposing rafters push against each other through it, and the resulting outward thrust at the wall plates must be resisted by ceiling joists or rafter ties near the plate line. A structural ridge beam actually carries the upper end of each rafter, so the rafters act as simple beams and generate no outward thrust, which is what allows a vaulted ceiling with no ties. That beam then needs posts and a load path to the foundation.
References
Background & Theory
History
Reviewed for accuracy by Abdullah, Technical Content Specialist ยท Editorial policy
Related Calculators
๐งฎAnchor Bolt Embedment Length Calculator
Calculate anchor bolt embedment length with inputs, formulas, and instant results.
๐งฎRebar Development Length Calculator
Calculate rebar development length with inputs, formulas, and instant results.
๐งฎEquivalent Length Fittings Calculator
Calculate equivalent length fittings with inputs, formulas, and instant results.
๐งฎHip and Valley Rafter Calculator
Calculate hip and valley rafter with inputs, formulas, and instant results.
๐งฎRidge Length Calculator
Calculate ridge length with inputs, formulas, and instant results.
๐งฎCeiling Fan Downrod Length Calculator
Calculate the correct downrod length for ceiling fans based on ceiling height.
๐งฎColumn Load Calculator
Calculate axial load capacity for columns based on material, section, and effective length.
๐งฎFence Post Spacing Calculator
Calculate optimal fence post spacing and total post count from fence length and terrain.