Rafter Length Calculator
No house is complete without a sturdy roof, and to build one, you need proper roof trusses - this is exactly what this rafter length calculator will help you find! 🏠
With the help of this tool, you can calculate the dimensions of your roof trusses in no time. However, this tool is more than a simple rafter calculator! You can also use it to figure out the truss count for your roof and, while you're at it, quickly estimate the total purchase and installation costs.
Read on to see the math that underpins working out truss dimensions, find out how to calculate rafter length, and learn the rafter length formula.
Ps.: If you're looking for the ultimate roofing guide, check out the roofing calculator.
How to use the rafter length calculator?
Our tool has two applications. You can use it as either a rafter length calculator, which estimates the dimensions of your trusses for you, or as a roof truss count calculator, which will allow you to estimate the roof truss costs as well (it even includes the price of installation).
To start your calculations, you need to choose one of the two options mentioned above. In the field above the illustration, pick either "rafter length" or "truss count".
- If you picked rafter length:
Start by deciding what you want the calculations to be based on. You can choose the rise of the roof (which is its height) or the roof pitch (which is the slope created by the rafter). If you want to learn more about the way it's calculated, check out our roof pitch calculator.
- If you picked the rise, all you need to do is input its value, put in the roof's run, and the calculator will return the rafter length in the bottom-most field.
💡 Please note that the rafter length calculator works both ways, that is, you can also use it to calculate the rise or the run! If you already know the rafter length and want to figure out any of the other dimensions, simply input the two you know, and you will get the third one.
If you decided to include roof pitch in your calculations, you will need to input the run and the pitch of the roof to get the rafter length. After doing that, you will see the rafter length in the bottom-most field.
Here as well, our calculator works both ways. You can input any of the two values to get the third one calculated.
You can input roof pitch in whichever format you prefer (angle, percentage, ratio), and our tool will automatically tell you the other ones.
- If you picked truss count:
Input the roof length, the on-center spacing (the distance between the middles of two neighboring roof trusses) and the rafter calculator will return the number of roof trusses needed.
Our tool can also figure out the approximate roof truss cost. In the appropriate fields of the calculator, decide whether you want to include the cost of installation in the calculations.
If you pick No, the only thing left to input is the cost of a single roof truss. The rafter length calculator will return the total expenses in the bottom-most field.
If you pick Yes, you will also need to declare how much per time unit the contractor would charge you to install the trusses, as well as the expected duration of the installation. As soon as you fill in all the variables, you will see the total expenses at the bottom of the calculator.
Don't worry if you're unsure what the roof's run, rise, on-center spacing, and such exactly mean - we've prepared an illustration of the variables you need to fill out in the calculator.
✅ If, on the other hand, you only need beams running through a room (and not trusses), you can check out our wood beam span calculator to help you choose the appropriate lumber size for your beams.
How to calculate rafter length?
The rafter length calculator lets you calculate truss dimensions using two slightly different sets of variables. It all comes down to what information you already have. Usually, that is either the pitch or the rise of the roof. What is more, the formula used to calculate roof truss dimensions is one you probably know very well - it's the exact same formula you use to describe a right triangle - Pythagoras!
The formulas we use are the following:
For calculations based on the roof rise:
rise² + run² = rafter length²,
rafter length = √(rise² + run²).
For calculations based on the roof pitch:
The formula used to calculate rafter length from roof pitch is, in fact, the same as the one above. The one difference is that we need to calculate the roof rise using the pitch first. So what you need to do first is to get the pitch, using the following formula:
rise / run = pitch,
expressed as a percentage, meaning that:
rise = run × pitch.
We can merge these two equations to get a single rafter length formula based on the roof pitch:
rafter length² = (run × pitch)² + run²
rafter length = √((run × pitch)² + run²)
rafter length = run × √(pitch² + 1)
If you're unsure about the terms such as roof run and rise, refer to the illustration below:
How to calculate truss count and roof truss cost?
As you know, figuring out rafter length and other truss dimensions is not the only thing you can use this tool for! Our tool calculator can also help out with planning out your roof project by estimating the truss count and showing you the costs you can expect for the materials and their installation. To do so, it uses the following equations:
truss count = ((roof length × 12)/24) + 1,
rounded up to the closest integer (for example if the result is 14.5, you need to get 15 trusses).
To calculate the costs, we use the following two formulas:
Including installation costs:
total costs = truss count * single truss price + cost per time unit of work × duration of work
Excluding installation costs:
total costs = truss count * single truss price
If you're interested in more details about calculating roof truss count, visit our roof truss calculator.
If you're unsure about the terms such as the on-center spacing, refer to the illustrations below: