How to Use the Rafter Length Calculator
This rafter length calculator helps you determine the dimensions of your roof trusses and estimate the total cost of materials and installation. It works in two modes: Rafter Length and Truss Count.
Mode 1: Rafter Length
Use this mode to calculate the rafter length (hypotenuse) from the roof geometry. You can base calculations on:
- Rise + Run — enter the vertical height (rise) and horizontal distance (run) of the roof.
- Pitch + Run — enter the roof pitch as a percentage, angle (°), or ratio (x:12) along with the run.
The calculator works both ways — enter any two known values to find the third.
Mode 2: Truss Count & Cost
Use this mode to estimate how many trusses your roof requires and calculate purchase and installation costs.
- Enter the total roof length (the ridge length along the building).
- Enter the on-center spacing — the distance between the centres of adjacent trusses (typically 2 ft / 0.6 m).
- Optionally enter the price per truss and choose whether to include installation costs.
How to Calculate Rafter Length
The rafter length formula is based on the Pythagorean theorem, since rise, run, and rafter length form a right triangle:
rafter length = √(rise² + run²)
If you know the pitch instead of the rise:
rise = run × pitch%/100 rafter length = run × √(pitch²/10000 + 1)
How to Calculate Truss Count
The number of roof trusses needed is calculated as:
truss count = ⌈roof_length / on-center_spacing⌉ + 1
The +1 accounts for the extra truss at the end of the roof.
Measurement Systems
The calculator fully supports both Imperial (feet, inches) and Metric (meters) measurement systems.
Currencies Supported
Cost calculations are available in 16 world currencies: USD ($), RUB (₽), EUR (€), GBP (£), CAD, AUD, JPY, CNY, BRL, MXN, INR, KRW, CHF, SEK, PLN, TRY.
FAQs
- What is the run?
- The run is the horizontal distance from the wall to directly below the ridge (the peak). It is half the total span of the roof.
- What is the rise?
- The rise is the vertical height of the roof from the top of the wall to the ridge.
- What is on-center spacing?
- On-center (OC) spacing is the distance measured from the center of one truss to the center of the next. Standard spacing in the US is 24 inches (2 ft) or 16 inches (1.33 ft). In metric it is typically 0.6 m.
- Does rafter length include overhang?
- This calculator computes the structural rafter length (from the wall to the ridge). Add the overhang length separately if required for your project.