{"id":"rafter-calculator","name":"Rafter Calculator — Length, Rise and Count","shortName":"Rafter Calculator","canonicalUrl":"https://calcurhome.com/calculators/rafter-calculator","catalogUrl":"https://calcurhome.com/api/calculators","category":{"id":"measurement-framing","name":"Measurement & framing","url":"https://calcurhome.com/calculators/category/measurement-framing"},"language":"en-US","audience":"US homeowners, DIYers and home-project planners","primaryKeyword":"rafter calculator","secondaryKeywords":["rafter length calculator","roof rafter calculator","common rafter calculator","rafter span calculator","roof pitch rafter length","how long should rafters be"],"description":"Calculate common-rafter line length, roof rise, slope factor, and preliminary gable-roof rafter count from span, pitch, overhang, and spacing.","directAnswer":"For a symmetrical gable roof, subtract half the ridge thickness from half the building span to find run to the ridge. Multiply horizontal distance by the pitch slope factor, √[1 + (rise ÷ 12)²], to calculate common-rafter line length before cut allowances.","inputs":[{"key":"buildingSpan","label":"Building span","unit":"ft","defaultValue":24,"min":0,"max":500,"step":0.1,"help":"Outside wall-to-wall horizontal span."},{"key":"pitch","label":"Roof rise per 12","unit":"in","defaultValue":6,"min":0,"max":48,"step":0.25},{"key":"overhang","label":"Horizontal overhang","unit":"in","defaultValue":12,"min":0,"max":120,"step":0.25},{"key":"ridgeThickness","label":"Ridge board thickness","unit":"in","defaultValue":1.5,"min":0,"max":24,"step":0.125},{"key":"roofLength","label":"Roof length","unit":"ft","defaultValue":32,"min":0,"max":1000,"step":0.1},{"key":"spacing","label":"Rafter spacing","unit":"in o.c.","defaultValue":16,"min":0,"max":48,"step":1},{"key":"waste","label":"Extra rafter pairs","unit":"%","defaultValue":10,"min":0,"max":100,"step":1}],"formula":{"title":"Common-rafter line-length formula","expression":"Line length = [span ÷ 2 − ridge thickness ÷ 24 + overhang ÷ 12] × √[1 + (pitch ÷ 12)²].","explanation":"Half the building span establishes the symmetrical roof run, and half the ridge-board thickness is deducted horizontally. The entered overhang extends that run beyond the wall. The Pythagorean slope factor converts total horizontal run to the sloped line length for a constant pitch."},"measurementGuide":["Measure the horizontal building span between outside wall lines; do not measure along an existing sloped roof surface.","Enter roof pitch as inches of vertical rise for every 12 inches of horizontal run, not as degrees or a percentage.","Measure overhang horizontally from the outside wall line to the intended tail plumb line.","Use actual ridge-board thickness and roof length, then verify all dimensions against the approved framing drawings."],"buyingTips":["Choose stock long enough for the calculated line plus required plumb cuts, birdsmouth geometry, tail details, and end trimming.","Check rafter species, grade, size, spacing, span, snow load, dead load, deflection, and ceiling attachment with code-approved span information.","Keep rafter pairs together when adding waste so the two roof planes retain matching layout positions.","Plan ridge boards or beams, ties, collar ties, blocking, hangers, uplift connectors, and outlookers separately from the common-rafter count."],"workedExample":{"title":"Twenty-four-foot-wide 6-in-12 gable roof","scenario":"A 24-foot span has a 6-in-12 pitch, 12-inch horizontal overhang, 1.5-inch ridge board, 32-foot roof length, 16-inch spacing, and 10% extra pairs.","result":"Run to the ridge is 11.94 feet and common-rafter line length is 14.46 feet; 25 layout pairs become 28 order pairs, or 56 rafters."},"commonQuestions":[{"question":"Does rafter length include the roof overhang?","answer":"Yes. This result includes the entered horizontal eave overhang and applies the same pitch through the tail. It does not add stock for birdsmouth placement, ridge or fascia cuts, decorative tails, field trimming, or unusual eave geometry, so verify the cut layout."},{"question":"Is rafter line length the same as rafter span?","answer":"No. Line length is geometric distance along the sloped member, while structural span depends on bearing conditions and code definitions. A calculated length does not prove that a chosen lumber size, species, grade, or spacing can carry the project’s loads."},{"question":"How does a thicker ridge board change rafter length?","answer":"Each opposing rafter stops at one face of the ridge board, so half the actual ridge thickness is deducted from each half-span horizontally. The change in sloped length is small, but including it improves geometric layout and avoids treating the rafters as meeting at a centerline."},{"question":"Can I use this calculator for a hip or shed roof?","answer":"Not directly. It models equal common rafters on both sides of a symmetrical gable roof. A shed roof uses different support geometry, while hip and valley roofs require diagonal member lengths and jack-rafter layouts. Use drawings and calculations specific to those roof forms."}],"sources":[{"name":"International Code Council — 2024 International Residential Code","url":"https://codes.iccsafe.org/content/IRC2024P1","note":"Primary model-code reference for conventional wall framing, roof framing, connectors, openings, and structural safety."},{"name":"American Wood Council — Span Options Calculator","url":"https://awc.org/resources/span-options-calculator-for-wood-joists-and-rafters/","note":"Industry reference for checking permitted wood joist and rafter spans; local code and project conditions still control."},{"name":"USDA Forest Products Laboratory — Wood Handbook","url":"https://www.fpl.fs.usda.gov/documnts/fplgtr/fplgtr282/fpl_gtr282.pdf","note":"Federal reference for wood characteristics, lumber terminology, dimensions, moisture, and structural use."}],"defaultCalculation":{"inputs":{"buildingSpan":24,"pitch":6,"overhang":12,"ridgeThickness":1.5,"roofLength":32,"spacing":16,"waste":10},"result":{"value":"14.46","unit":"ft","label":"Common-rafter line length","lines":[{"label":"Run from wall to ridge","value":"11.94 ft"},{"label":"Rise from wall to ridge","value":"5.97 ft"},{"label":"Roof slope factor","value":"1.118"},{"label":"Layout rafter pairs","value":"25"},{"label":"Rafters to order","value":"56 rafters (28 pairs)"}],"summary":"Each common rafter has an estimated 14.46-foot line length including the horizontal overhang, while the gable roof uses 25 layout pairs before waste.","note":"This is roof geometry, not a span or cut approval; verify bearing, birdsmouth, tail, ridge, stock length, species, grade, loads, and local code."}},"reviewedOn":"2026-07-24","disclaimer":"Planning estimate only. Verify product coverage, supplier rounding, local codes and structural requirements before purchase or construction."}