Rafter length calculator
A 24 ft span at a 6/12 pitch with a 1.5 ft overhang needs a common rafter about 14.9 ft long, 13.4164 from ridge to plate plus the tail. Enter span, pitch and overhang in one unit and get the length before cuts and waste. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Total roof span
- 24
- Pitch
- 6
- Overhang
- 1.5
- Pitch label
- 6/12 length
- Half span
- 12
- Rise
- 6
- Pitch factor
- 1.118
This rafter length calculator returns the common rafter length for a simple gable roof once you know the building span, the pitch as rise per twelve units of run, and any eave overhang measured along the rafter. The engine halves the span to get the horizontal run from ridge to wall plate, multiplies by the pitch ratio to find the rise, applies Pythagoras for the sloping length from ridge to plate, then adds the overhang tail. A classic check uses a twenty-four unit span with a six-twelve pitch and a one-and-a-half unit overhang, which yields about fourteen point nine units of stock after the square root step. All three measurements must share the same linear unit—feet, inches, or metres—because the engine never converts units for you. The work is pure deterministic arithmetic with no network calls, no sampling, and no date-dependent shortcuts.
What a common rafter is and what you get back
A common rafter is the straight member that runs from the ridge board down to the wall plate on a simple gable roof, not a hip, valley, or jack rafter. Its length is the hypotenuse of a right triangle whose base is half the building span and whose height is the rise over that same half-span, plus any eave tail beyond the plate.
Pitch is stated the way carpenters buy stock and read tables: units of rise for every twelve units of run, so six means six-twelve and twelve means a forty-five degree slope in the pure geometry sense. There is no lumber SKU catalogue, no birdsmouth cut depth, and no code span table baked into the core number: you get a geometric take-off so you can add waste, seat cuts, and ridge thickness after the pure length is known.
Where rafter take-offs fit in DIY, trade quotes, and software
Homeowners meet this calculation when a shed, porch, or garage roof needs a lumber list before the weekend install, or when a materials quote must not under-order stock after the pitch and eave are fixed by the design. Framers and small contractors use the same numbers to turn a measured span into a shopping list before they leave the yard, then add seat-cut waste and ridge thickness that the pure geometry does not include.
Estimators embed the contract in take-off tools so a schedule of span, pitch, and overhang becomes a single rafter length without a spreadsheet full of hidden cells and mixed units. Product and education tools show learners why doubling the span does not simply double the board length once the pitch factor multiplies the half-span run.
Pair it with fence, paint, or brick helpers when you are building a small lab of free, deterministic home-improvement calculators, and keep site judgement for birdsmouths, hangers, and code spans that your elevation requires beyond the pure common rafter line.
What you can do with it
DIY roof lumber shopping lists
Convert measured building span, roof pitch, and eave overhang into a common rafter length before you buy stock at the yard.
FAQ
What does the rafter length calculator cost?
It is free in your browser on this page.
How is common rafter length defined?
Pitch is rise per 12 units of run.
What happens if span is zero or negative?
A zero or negative span cannot define a roof run for common rafter length.
Is overhang measured horizontally or along the rafter?
Along the rafter: it is added after the ridge-to-plate hypotenuse, as an eave tail beyond the wall plate in the same linear unit as span.
Does this tool size hip or valley rafters?
No. It only computes the common rafter length for a simple gable geometry from span, pitch, and overhang.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/home/rafter-length \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"span":24,"pitch":6}'const res = await fetch("https://api.kit.forhosting.com/home/rafter-length", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"span": 24,
"pitch": 6
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/home/rafter-length",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"span": 24,
"pitch": 6
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/home/rafter-length", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"span":24,"pitch":6}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"span":24,"pitch":6}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/home/rafter-length", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"span": 24,
"pitch": 6
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "home.rafter_length",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_abs | 1000000000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
What common rafter length means and what the response contains
This calculator returns the parsed span, pitch, and overhang, a pitch_label string such as six slash twelve, the half_span run, the vertical rise to the ridge line, the pitch_factor multiplier equal to the square root of one plus the unit-rise squared, the ridge_to_plate sloping length before the tail, the final rafter_length, a unit tag, the precision used, a method tag, and a short formula string you can audit. Rejected cases include missing span or pitch, non-finite values, magnitudes above the documented ceiling, a zero or negative span, a negative pitch, and a negative overhang, because a non-positive span cannot define a roof run and a negative tail is not a physical eave.
How span, pitch, overhang, and precision are read and stay reproducible
Overhang accepts overhang plus eave, tail, projection, and O; omitting it defaults to zero so a pure ridge-to-plate length is still one request. Prefer span for the full wall-plate-to-wall-plate width, with aliases roof_span, building_span, width, and S so forms and query strings can reuse the same contract. Pitch accepts pitch plus aliases rise, pitch_rise, X, and roof_pitch, always as the rise component of an X-over-twelve pitch, never as degrees or as a unitless slope alone. Optional precision, with aliases decimals and dp, chooses decimal places for every numeric field in the response, defaulting to four and capped at fifteen so JSON goldens stay stable. Computation forms half_span as span divided by two, multiplies by pitch over twelve to get rise, builds pitch_factor as the square root of one plus unit-rise squared, multiplies half_span by that factor for ridge_to_plate, then adds overhang for rafter_length. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing the half-span and pitch-factor layout yourself.
Where rafter take-offs fit in DIY, trade quotes, and software
On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a phone check on site to an automated pipeline without changing the mathematical result.
Integration use cases
Trade quotes and framing take-offs
Turn span, pitch, and overhang schedules into reproducible rafter_length values for written roofing and framing quotes.
Estimating software and CI fixtures
Generate deterministic common rafter lengths for unit tests, property checks, and automated material take-off pipelines.