Roof Truss Geometry Calculation: A Structural Engineer’s Guide to Accurate Top and Bottom Chord Sizing

Engineering Guide

← Back to calculator

What Is This Calculation and Why It Matters

Roof truss geometry calculation is the foundational structural analysis step that determines the precise dimensional layout of primary truss members—specifically the top chords (rafter legs), bottom chord (ceiling tie), and overall height—based on architectural intent and load-path requirements. Unlike generic framing estimates, this calculation translates geometric constraints—span, pitch, and overhang—into exact member lengths essential for fabrication accuracy, connection design, material ordering, and compliance with structural integrity standards.

Why does it matter? Because an error of just 12 mm in top chord length can cascade into critical issues: misaligned gusset plates, compromised compression capacity in sloped members, unintended bending in the bottom chord due to improper restraint, or even failure to achieve required diaphragm continuity at eaves. In timber trusses—where dimensional stability is sensitive to moisture-induced shrinkage—precise initial geometry ensures that serviceability limits (e.g., deflection ≤ L/240 per ASCE 7-22 §C3.2.2) remain achievable without field modification. Moreover, modern prefabricated truss systems rely on CNC-cut lumber; inputting incorrect chord lengths directly causes costly rework, schedule delays, and potential non-conformance with ANSI/TPI 1–2023 §3.1.2 ("Trusses shall be fabricated to within ±1/8 inch [3.2 mm] of specified dimensions").

This calculation is not merely arithmetic—it is the first line of defense against geometric incompatibility between architectural vision and structural reality.

Theory and Formula Walkthrough

The roof truss calculator described here models a simplified, symmetric, common (or king-post–derived) truss geometry: two identical top chords meeting at the ridge, a horizontal bottom chord spanning between supports, and vertical rise governed by roof pitch. While real trusses contain webs and multiple joints, this baseline geometry defines the envelope within which all internal members must fit—and therefore governs minimum material lengths, connection layout, and erection sequencing.

Key Variables and Their Physical Meaning

  • Span (span): The clear horizontal distance between the interior faces of supporting walls or bearing points (e.g., exterior stud walls). Measured in meters, it defines the structural bay width. Critically, span excludes overhangs—it is purely the load-bearing portion. Per ICC IBC 2021 §2308.5.1, span is the basis for determining allowable spans for truss components under dead + live loads.

  • Pitch (pitch): The angle (in degrees) between the top chord and the horizontal plane. Pitch is not rise:run ratio (e.g., 6:12), though convertible via tan(pitch) = rise / (span/2). Using degrees—not fractions—avoids ambiguity in trigonometric evaluation and aligns with ISO 8932:2021 Annex B conventions for angular input in structural software. Pitch directly controls vertical clearance, snow load accumulation area, and wind pressure coefficients (ASCE 7-22 §27.4.1).

  • Overhang (overhang): The horizontal projection beyond the supporting wall, measured from the wall’s outer face to the rafter tail’s end. It serves weather protection (shading windows, diverting rainwater) and aesthetic continuity. Overhang adds to bottom chord length but does not affect top chord geometry, as top chords terminate at the ridge and extend downward only to the wall plate—not beyond it. However, overhang does influence fascia attachment, soffit framing, and lateral bracing anchorage per ANSI/TPI 1–2023 §4.3.3.

Deriving the Output Formulas

1. Top Chord Length

Formula: sqrt((span/2)^2 + (span * tan(radians(pitch)) / 2)^2) * 2

Derivation: Each top chord forms the hypotenuse of a right triangle whose:

  • Base = half the span (span/2) — horizontal run from wall plate to ridge centerline.
  • Height = vertical rise from wall plate to ridge = (span/2) × tan(pitch) → equivalently span × tan(pitch) / 2.

Thus, one chord length = √[(span/2)² + (span × tan(pitch)/2)²]. Multiply by 2 for both sides.

Note on unit consistency: tan(radians(pitch)) converts degrees to radians because most computational engines (JavaScript, Python math libraries) require radian input. Failure to convert yields grossly erroneous results (e.g., tan(30) ≈ 0.577 vs. tan(30°) = 0.577—but tan(30) in radians ≈ −0.577, flipping sign and magnitude).

2. Bottom Chord Length

Formula: span + 2 × overhang

Derivation: The bottom chord runs continuously from outer face to outer face of supports, including both overhangs. Since overhang extends equally on left and right, total length = interior span + left overhang + right overhang = span + 2 × overhang.

Critical nuance: This assumes the bottom chord is co-planar with the ceiling plane and terminates at the outer edge of each wall. In practice, the actual lumber piece may be longer to accommodate bearing seat cuts or hangers—but the effective structural length used in axial capacity checks (e.g., NDS 2018 §3.7.2 for tension/compression) is this net length.

3. Total Height

Formula: span × tan(radians(pitch)) / 2

Derivation: Identical to the rise component above—the vertical distance from the wall plate elevation to the ridge apex. This dimension governs attic clearance, ventilation baffle height, insulation depth, and headroom for habitable spaces. It also anchors the vertical coordinate system for web member layout.

Why not rise = (span/2) × tan(pitch)? Algebraically identical—but expressing as span × tan(pitch) / 2 emphasizes direct proportionality to span and avoids nested parentheses in code implementation, reducing operator error during manual entry.

Standard Requirements

While no single standard prescribes how to calculate chord lengths, dimensional fidelity is mandated across interlocking codes:

  • ANSI/TPI 1–2023 (National Design Standard for Metal Plate Connected Wood Trusses): §3.1.2 requires trusses to be fabricated “within ±1/8 inch (3.2 mm) of specified dimensions.” This tolerance applies to all critical dimensions—including top chord length and bottom chord length—as verified during third-party quality assurance inspections.

  • IBC 2021 §2308.5.1 & §2308.5.2: Specifies maximum allowable spans for truss components based on species, grade, and loading. These tables assume nominal member sizes and geometrically accurate assembly. Deviations exceeding ±3 mm invalidate span tables unless recalculated per NDS 2018 §3.3.

  • ASCE 7-22 §2.3.2 (Load Combinations): Requires truss designs to resist factored loads applied at the correct nodal locations. Incorrect chord length shifts node positions, altering moment distribution and potentially violating equilibrium assumptions in analysis models.

  • ISO 8932:2021 (Timber structures — Calculated values for structural timber): Clause 6.2.1 states that “geometric parameters used in design models shall reflect as-built conditions within manufacturing tolerances.” Thus, calculation inputs must match field-measured as-designed geometry—not conceptual sketches.

Non-compliance risks rejection by building departments, liability exposure during performance failures (e.g., ponding due to insufficient ridge height), and voided product warranties from truss fabricators.

Common Mistakes and How to Avoid Them

Mistake 1: Confusing Pitch with Rise:Run Ratio

Error: Entering pitch = 6 for a 6:12 roof (i.e., mistaking ratio numerator for degrees). A 6:12 roof has pitch = arctan(6/12) ≈ 26.6°, not 6°. Consequence: Top chord length error > 15% (e.g., 10 m span, 6° input → calculated rise = 0.52 m vs. true 2.33 m). Fix: Always convert rise:run to degrees: pitch_deg = degrees(atan(rise/run)). Maintain a conversion table or embed in calculator UI.

Mistake 2: Including Overhang in Span Input

Error: Setting span = 11.2 m for a 10 m bay + 0.6 m overhang each side. Consequence: Top chord length inflated by ~6%, bottom chord double-counts overhang, total height overestimated. Fix: Train designers to measure span between bearing points only. Use annotated drawings with callouts: “SPAN = 10,000 mm (to wall centerline)” and “OVERHANG = 600 mm (beyond outer wall face).”

Mistake 3: Neglecting Unit Consistency in Tangent Functions

Error: Using tan(pitch) instead of tan(radians(pitch)) in spreadsheets or scripts. Consequence: For pitch = 30, tan(30) ≈ −0.577 (radians) → negative rise → catastrophic sign error. Fix: Implement input validation: if pitch > 45, warn “Pitch exceeds typical residential range—verify units.” Enforce radians conversion in all code paths.

Mistake 4: Assuming Bottom Chord Equals Span Without Overhang Adjustment

Error: Using bottom_chord_length = span when overhang exists. Consequence: Fascia boards project beyond truss ends, requiring field splicing or unsafe cantilevers. Fix: Explicitly label inputs: “Span (between supports)” and “Overhang (per side).” Auto-populate bottom chord in UI with real-time update.

Mistake 5: Relying Solely on Calculator Without Verifying Geometry Against Detail Drawings

Error: Accepting output without cross-checking against architectural sections. Consequence: Mismatched ridge heights, interference with HVAC ducts, or insufficient attic ventilation space. Fix: Require signed checklist: “✓ Top chord length matches Section A-A”, “✓ Total height clears ductwork by ≥150 mm”, “✓ Overhang aligns with soffit detail.”

Worked Example with Realistic Numbers

Project Context: A single-story residential addition in Portland, OR. Roof supports a 2×6 rafter system with asphalt shingles, designed for 40 psf ground snow load (ASCE 7-22 Figure 7.2-1).

Given Inputs:

  • span = 9.85 m (distance between interior faces of 2×6 stud walls)
  • pitch = 22.5° (equivalent to 5:12 rise:run — commonly used for balanced drainage/aesthetics)
  • overhang = 0.45 m (standard for 12″ soffit depth and gutter integration)

Step-by-Step Calculation:

  1. Top Chord Length:

    • Half-span = 9.85 / 2 = 4.925 m
    • tan(22.5°) = tan(radians(22.5)) ≈ 0.4142
    • Rise = 9.85 × 0.4142 / 2 = 2.040 m
    • One chord = √(4.925² + 2.040²) = √(24.256 + 4.162) = √28.418 ≈ 5.331 m
    • Total top chord length = 5.331 × 2 = 10.662 m
  2. Bottom Chord Length:

    • = 9.85 + 2 × 0.45 = 9.85 + 0.90 = 10.75 m
  3. Total Height:

    • = 9.85 × 0.4142 / 2 = 2.040 m (ridge height above wall plate)

Validation Check:

  • Does top chord length exceed span? Yes (10.662 > 9.85) — expected for pitched roofs.
  • Is bottom chord longer than top chord? Yes (10.75 > 10.662) — confirms overhang contribution dominates.
  • Does rise match 5:12? 5/12 = 0.4167; tan(22.5°) = 0.4142 — difference < 0.6%, acceptable per ANSI/TPI 1–2023 §A.2.1 (design tolerance).

Field Implementation Notes:

  • Specify lumber as “S4S SPF #2, 2×6, cut to 10.662 m ±3 mm” for top chords.
  • Order bottom chord as “10.750 m ±3 mm” with pre-cut birdsmouth notches at 4.925 m from each end.
  • Verify on-site: measure from ridge beam underside to wall plate top surface = 2.040 m ±5 mm (accounting for plate thickness).

This example illustrates how disciplined application of the calculator—paired with verification—ensures constructability, code compliance, and long-term performance. Never treat the output as final design; always integrate it into full truss analysis per NDS 2018 Chapter 3 and connection design per ANSI/TPI 1–2023 Chapter 5.

← Back to Roof Truss Calculator