Rafter Length Calculator
Calculate rafter length accurately for your build. Get material quantities, waste allowances, and project cost breakdowns.
Reviewed for accuracy by Abdullah, Technical Content Specialist
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.
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.