Roof Truss Calculator
Calculate rafter/top-chord length and truss count for your roof, with material and installation cost.
Roof Truss Calculator: How Many Trusses Do You Need?
Framing a roof with prefabricated trusses turns two separate questions into one: how long does each top chord (rafter) need to be, and how many trusses does the full roof length actually require? Get either number wrong and you either order too few trusses and stall the job waiting on a re-order, or over-order and pay to store or return the extras. This roof truss calculator works out the top-chord length from your rise and run, then works out the truss count from your roof length and on-center (OC) spacing, adds a waste allowance, and gives you a material cost estimate — and an optional installation cost — on top.
It's built for anyone planning a trussed roof: DIYers framing a shed, garage or extension, self-builders costing out a new roof, and small contractors who need a fast, defensible truss count for a quote. Unlike a plain spacing calculator, this one rounds the truss count up to a whole number (you can't order half a truss), applies a waste allowance most competing tools skip entirely, and lets you layer an installation-cost estimate on top of the material cost so the total reflects what the job will actually cost.
Enter the rise and run of your roof (or work from your pitch separately using this suite's roof pitch calculator) to get the rafter length, then enter the roof length and pick an on-center spacing — 12, 16 or 24 inches, or a metric equivalent — to get the truss count. Adjust the waste allowance, toggle installation cost on if you want it included, and the calculator handles every conversion and rounding step for you.
How to Use the Roof Truss Calculator
- Enter the rise of the roof and choose its unit (m, cm, ft or in).
- Enter the run of the roof and choose its unit — rise and run together set the roof pitch and determine the rafter (top-chord) length.
- Enter the total roof length and choose its unit — this is the length the trusses need to span along, not the rafter length.
- Enter the on-center (OC) truss spacing, or pick a common preset — 12 in, 16 in, 24 in (the most common residential spacing), or 600 mm.
- Adjust the waste allowance if needed — the default 5% covers a spare truss for on-site damage or a design change, up to a maximum of 15%.
- Optionally tick "include installation cost" and enter an installation cost per hour and an estimated duration in hours.
- Read off the rafter length, the number of trusses to order, the material cost, and — if enabled — the installation cost and total cost.
The Math Behind the Calculation
The rafter (top-chord) length is the hypotenuse of a right triangle formed by the roof's rise and run, so it follows the Pythagorean theorem: rafter length = the square root of (rise squared plus run squared). A rise of 3 m and a run of 4 m, for example, gives a rafter length of the square root of (9 + 16) = the square root of 25 = 5 m exactly — a classic 3-4-5 triangle that is easy to check by hand.
Truss count follows the fencepost convention, not a plain division: raw truss count = the roof length divided by the OC spacing, rounded up, plus one. The "plus one" matters because a truss sits at both ends of the roof as well as at every spacing interval in between — dividing the length by the spacing alone would undercount by exactly one truss. A waste allowance is then applied to that raw count and the result rounded up again to a whole number, since a fraction of a truss cannot be ordered.
Worked example: a roof 9 m long, trussed at 0.6 m (600 mm) OC spacing. Raw count = 9 / 0.6 = 15 exactly, plus one = 16 trusses before waste. Applying a 5% waste allowance: 16 x 1.05 = 16.8, rounded up to 17 trusses to order — the number this calculator would show, and the number you should hand to a supplier for a quote.
Pro Tips and Common Mistakes
At a typical Maltese material cost of around €140 per truss, a 9 m roof trussed at 600 mm centres (17 trusses including a 5% waste allowance) costs roughly €2,380 in raw material — timber trusses are less common than reinforced-concrete slab roofs in Malta, so this applies mainly to pitched extensions, garages and lightweight-roof outbuildings.
- 24 inches (roughly 600 mm) on-center is the standard residential truss spacing in most markets, giving a good balance between the number of trusses needed and the roof sheathing's ability to span unsupported between them without sagging — 16 in or 12 in spacing is used for heavier roof coverings (slate, tile) or longer spans that need extra support.
- Don't forget the gable-end truss. The truss at each gable end of the roof is often a different, non-load-bearing design (sometimes called a "gable ladder" or "barge" truss) built to carry the gable wall covering rather than roof load — check whether your truss count and cost need one or two of these in addition to the standard load-bearing trusses this calculator counts.
- Engineered trusses (built off-site with metal connector plates to an engineer's design for your specific span and load) are the default choice for anything beyond a small shed roof — they carry a stamped design load and are far more consistent than site-built trusses, which are only appropriate for short, simple spans and should never be used without checking local building code.
- Round the truss count up, never down — this calculator does that automatically, but if you're checking the math by hand, remember that even a small overrun in roof length can push the count up by a full truss once the fencepost "plus one" is applied.
- Use the higher end of the waste-allowance range if the trusses are being delivered a long distance, if the crew is inexperienced, or if a design change mid-project is plausible — a spare truss on site is far cheaper than a stalled job waiting on a special re-order.
- Large trusses are genuinely heavy and awkward to lift into position — factor crane or boom-truck hire into your installation cost estimate for anything beyond a small single-story roof, rather than assuming a manual lift.


