Formula and worked example
This tool follows one straight common-rafter reference line through the outside-wall line, up to the near ridge/support face, and down to a projected tail endpoint. It calculates geometric line lengths. It does not produce a cut list, stock size, birdsmouth layout or structural design.
For a symmetric gable with centered ridge, body horizontal run R = (full outside-wall span S − actual horizontal ridge thickness T) / 2. For measured-run mode, R is your horizontal wall-line-to-upper-face distance, with no additional ridge deduction. Let p be vertical rise per 12 horizontal run and H be horizontal overhang. Slope factor F = sqrt[1 + (p/12)²]. Body length = R × F; sloped tail = H × F; total line length = (R + H) × F. Roof angle above horizontal = atan(p/12). Body rise = R × p/12; tail drop = H × p/12.
Independent US geometry
A 24 ft outside-wall span with a 1.5 in actual ridge thickness gives R = (24 − 1.5/12) / 2 = 11.9375 ft. At 6:12, F = sqrt(1.25) = 1.118033988750. Body line length is 13.346530741 ft. A 12 in horizontal overhang adds 1.118033989 ft along the slope, giving 14.464564729 ft total, or 4.408799330 m. Body rise between reference-line points is 5.96875 ft. The ridge shortens the ideal centerline length by 0.069877124 ft along the slope, not simply 0.0625 ft.
For a separate 9:12 check, F is exactly 1.25. With the same span, ridge and overhang, body length is 14.921875 ft, tail is 1.25 ft and total is 16.171875 ft. With zero ridge thickness instead, body run is 12 ft, body length is 15 ft and total is 16.25 ft. These examples use the 3:4:5 triangle relationship.
Independent metric geometry
An 8 m outside-wall span, 40 mm ridge thickness and 500 mm horizontal overhang at 9:12 give R = (8 − 0.04) / 2 = 3.98 m. Body rise is 2.985 m; body length is 4.975 m; sloped tail is 0.625 m. Total line length is 5.6 m. Alternatively, a directly measured 3 m run with 400 mm overhang at 9:12 gives a 3.75 m body, 0.5 m tail and 4.25 m total. Measured-run mode does not deduct a ridge again.
Define the endpoints before measuring
Full span is measured between outside-wall reference lines, without eave overhangs. The gable ridge is assumed centered with equal slopes. Ridge thickness is the actual horizontal width across the span, not ridge-board vertical depth or a nominal lumber label. Zero thickness represents an ideal centerline. Measured-run mode accepts an already adjusted horizontal distance to the upper face and can describe a simple shed rafter. Hidden inputs from the other mode are ignored.
The overhang is horizontal, from the outside-wall line to the intended projected tail endpoint. A tail continuing at the same slope is longer than its horizontal projection. Enter zero if no tail is required. Body and tail are added once for one rafter; do not double the answer because a gable has two roof slopes. Gable-end/rake overhang is in a different direction and is not this input.
Line geometry versus framing layout
Reported rise is between points on the straight rafter reference line. It is not ridge height above a plate, foundation or floor. Birdsmouth, seat-cut position, height above plate, fascia thickness, end-cut geometry, saw kerf and cutting/stock allowance are outside this model. No lumber depth, grade, species, spacing, loading, allowable span, deflection or connection check is performed. A line length alone cannot determine a suitable rafter size or purchased board length. Review the framing design and layout separately.
This page covers common straight rafters at a uniform slope. Hips, valleys, jacks, trusses, curved members, unequal-pitch gable geometry and offset ridges need their own layouts. Zero slope returns level geometry and forms no gable peak. It does not establish roofing-material suitability.
Units and calculation limits
Lengths accept ft, in, yd, m, cm and mm. Changing a length unit converts that measurement using the existing site converter. Decimal fields accept up to 18 decimal places. Active spans/runs must be 0.000001–1,000,000 ft, and ridge-adjusted body run must be at least 0.000001 ft. Ridge and horizontal overhang may be 0–100 ft; ridge must be smaller than full span. Rise per 12 must be 0–120; calculated total line length may not exceed 10,000,000 ft. These bounds are input safeguards, not construction recommendations.
Horizontal dimensions and ridge subtraction use exact decimal fractions; square-root and angle calculations use floating point. Displayed lengths round to three decimals, which is not a cutting tolerance. For slope conversion see Roof Pitch Calculator; for surface measurements use Roof Area Calculator; for a quote-based budget use Roofing Cost Calculator.
Primary references
Swanson Tool Co.: 12/12 roof pitch and rafter reference describes slope and common-rafter line geometry. Dale Diamond’s JLC common-rafter layout example shows an adjusted horizontal run derived from wall span and ridge thickness (September 2017, page 24). References inspected 30 October 2026. Civilable implements the stated common-rafter geometry and original examples above; it does not implement the articles’ cutting layouts.