Rafter Length Calculator
Calculate the length of a rafter given the width of the building, overhang, and width of the beam, if any.
|Feet and Inches:|
|Hip & Valley Factor:|
On this page:
How to Calculate the Length of a Rafter
A rafter is a structural member that provides support for the roof sheathing and transfers the weight of the roof to the exterior walls of a building. Calculating the length of the rafters is an essential part of framing a roof or truss.
The length of a rafter is the distance between the point where the rafter meets the beam (or opposing rafter for a truss) and the end of the overhang. Note that this is not necessarily the same as the length of the rafter board, which might need to be cut longer to account for rafter tails or an edge profile.
You can calculate the length of a rafter in a few easy steps.
Step One: Calculate the Roof Pitch
The roof pitch is the angle of the roof and can be measured in several ways, but is most commonly expressed in rise over a standard 12-inch run. But, in order to calculate the rafter length, we need to calculate the pitch in degrees.
The angle in degrees is equal to the inverse tangent of the pitch of the roof.
angle = arctan(pitch / 12)
You can also find the angle for your roof pitch in the table below.
|Roof Pitch||Angle in Degrees|
Step Two: Measure the Roof Span
The roof’s span is the distance between the two walls that the roof will be resting on. You’ll also need to account for the overhang beyond the building on either side.
Measure the span by measuring the width of the building using a tape measure, then add the overhang on either side to the measurement.
Step Three: Calculate the Rafter Run
The rafter’s run is the horizontal distance between the end of the rafter and where it meets the beam or opposing rafter. To calculate the run, divide the total width of the building in half. Then, account for the beam or ridge board by subtracting half of its width from the run.
run = (total width ÷ 2) – (beam width ÷ 2)
Step Four: Calculate the Rafter Length
Now that you know the run and the angle in degrees, you can use trigonometry to calculate the rafter length. Since the cosine of an angle in a right triangle is equal to the length of the adjacent side divided by the hypotenuse, we can derive the following formula to calculate the rafter length:
rafter length = run ÷ cos(angle)
The rafter length is equal to the run divided by the cosine of the roof’s angle.
You might also be interested in our roofing calculator to find how many squares of shingles you’ll need to finish it off.