{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"roof-pitch"},"result":{"entity_type":"calculator","id":"roof-pitch","calculator_id":"roof-pitch","canonical_url":"https://tttkmbb.com/construction/roof-pitch","name":"Roof Pitch Calculator","title":"Roof Pitch Calculator – Pitch x:12, Angle, Slope Percent and Rafter Length Multiplier","category":"construction","category_name":"Construction & Home","tool_name":"calculate_roof_pitch","featured_mcp_tool":false,"description":"Converts a roof slope given as rise and run, or as an angle, into the pitch expressed in rise per 12 units of run, the angle in degrees, the slope in percent and the rafter length multiplier (rafter length per unit of horizontal run).","use_when":"You need to convert between roof pitch notations (x:12, degrees, percent) or estimate rafter length from the horizontal run.","do_not_use_when":"You need a general right-triangle solution with all sides (use right-triangle) or a plain angle unit conversion (use angle).","inputs":[{"name":"rise","label":"Rise","type":"number","required":false,"min":0,"max":1000000,"description":"Vertical rise over the given run (any length unit, same as run). Give rise + run, or angle_degrees.","example":3},{"name":"run","label":"Run","type":"number","required":false,"default":12,"max":1000000,"exclusive_min":0,"description":"Horizontal run over which the rise is measured (same unit as rise). With the default 12, rise is directly the pitch numerator (e.g. 4 → 4:12).","example":12},{"name":"angle_degrees","label":"Roof angle","type":"number","unit":"°","required":false,"min":0,"exclusive_max":90,"description":"Roof angle from horizontal in degrees; used only when rise is not given.","example":14.04},{"name":"horizontal_run_length","label":"Horizontal run of rafter","type":"number","required":false,"exclusive_min":0,"description":"Optional horizontal distance the rafter spans (e.g. half the building width for a gable roof), any unit; returns the rafter length in the same unit (excluding overhang).","example":5}],"outputs":[{"name":"pitch_per_12","label":"Rise per 12 run","type":"number","decimals":2,"description":"Rise for 12 units of run (US pitch notation)."},{"name":"pitch","label":"Pitch","type":"string","decimals":4,"description":"Pitch written as rise:12."},{"name":"angle_degrees","label":"Angle","type":"number","unit":"°","decimals":2,"description":"atan(rise / run) in degrees."},{"name":"slope_percent","label":"Slope","type":"number","unit":"%","decimals":2,"description":"100 × rise / run."},{"name":"rafter_multiplier","label":"Rafter length multiplier","type":"number","decimals":4,"description":"√(rise² + run²) / run = 1 / cos(angle); multiply the horizontal run by this to get the rafter length."},{"name":"rafter_length","label":"Rafter length","type":"number","decimals":3,"description":"horizontal_run_length × rafter_multiplier (same unit as horizontal_run_length); only when given."}],"input_schema":{"type":"object","properties":{"rise":{"description":"Vertical rise over the given run (any length unit, same as run). Give rise + run, or angle_degrees.","type":"number","minimum":0,"maximum":1000000,"examples":[3]},"run":{"description":"Horizontal run over which the rise is measured (same unit as rise). With the default 12, rise is directly the pitch numerator (e.g. 4 → 4:12).","type":"number","maximum":1000000,"exclusiveMinimum":0,"default":12,"examples":[12]},"angle_degrees":{"description":"Roof angle from horizontal in degrees; used only when rise is not given. Unit: °.","type":"number","minimum":0,"exclusiveMaximum":90,"examples":[14.04],"x-unit":"°"},"horizontal_run_length":{"description":"Optional horizontal distance the rafter spans (e.g. half the building width for a gable roof), any unit; returns the rafter length in the same unit (excluding overhang).","type":"number","exclusiveMinimum":0,"examples":[5]}},"additionalProperties":false},"output_schema":{"type":"object","properties":{"pitch_per_12":{"description":"Rise for 12 units of run (US pitch notation).","type":"number"},"pitch":{"description":"Pitch written as rise:12.","type":"string"},"angle_degrees":{"description":"atan(rise / run) in degrees. Unit: °.","type":"number","x-unit":"°"},"slope_percent":{"description":"100 × rise / run. Unit: %.","type":"number","x-unit":"%"},"rafter_multiplier":{"description":"√(rise² + run²) / run = 1 / cos(angle); multiply the horizontal run by this to get the rafter length.","type":"number"},"rafter_length":{"description":"horizontal_run_length × rafter_multiplier (same unit as horizontal_run_length); only when given.","type":"number"}}},"formula":"pitch_per_12 = 12 × rise / run; angle = atan(rise / run); slope_percent = 100 × rise / run; rafter_multiplier = √(1 + (rise/run)²); rafter_length = horizontal_run_length × rafter_multiplier. From an angle: rise/run = tan(angle).","sources":[{"name":"Wikipedia – Roof pitch","url":"https://en.wikipedia.org/wiki/Roof_pitch","type":"reference","retrieved_at":"2026-09-23"},{"name":"ICC – 2021 International Residential Code, Chapter 3 Building Planning (R311.7 Stairways)","url":"https://codes.iccsafe.org/content/IRC2021P2/chapter-3-building-planning","type":"standard","retrieved_at":"2026-09-23"}],"freshness":{"type":"static","max_age_seconds":null,"note":"Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output."},"examples":[{"name":"3:12 pitch, 5 m horizontal run","inputs":{"rise":3,"run":12,"horizontal_run_length":5},"expected":{"pitch_per_12":3,"pitch":"3:12","angle_degrees":14.04,"slope_percent":25,"rafter_multiplier":1.0308,"rafter_length":5.154},"url":"https://tttkmbb.com/api/v1/calculate/roof-pitch?rise=3&run=12&horizontal_run_length=5"},{"name":"30° roof","inputs":{"angle_degrees":30},"expected":{"pitch_per_12":6.93,"pitch":"6.93:12","angle_degrees":30,"slope_percent":57.74,"rafter_multiplier":1.1547},"url":"https://tttkmbb.com/api/v1/calculate/roof-pitch?angle_degrees=30"}],"faq":[{"q":"What is a 4:12 pitch in degrees?","a":"atan(4/12) = 18.43°, a slope of 33.3 %. Pitches below 2:12 (9.5°) are considered low-slope and usually need membrane rather than shingle roofing."},{"q":"Is pitch the same as slope?","a":"In US practice 'pitch' means rise per 12 in of run (e.g. 6:12); historically pitch was rise over the full span (6:12 = 1/4 pitch). Slope in percent is 100 × rise/run."},{"q":"Does rafter_length include the overhang or the ridge board?","a":"No. It is the sloped length over the horizontal run you enter; add the eave overhang and subtract half the ridge-board thickness when cutting rafters."}],"tags":["roof pitch","pitch to degrees","roof slope","rafter length","x:12","roof angle"],"related":[{"calculator_id":"right-triangle","reason":"Solve the full rafter triangle from any two values."},{"calculator_id":"stairs","reason":"Another rise-over-run design calculation."},{"calculator_id":"angle","reason":"Convert between degrees, radians and gradians."}],"links":{"html":"https://tttkmbb.com/construction/roof-pitch","markdown":"https://tttkmbb.com/construction/roof-pitch.md","json":"https://tttkmbb.com/construction/roof-pitch.json","api":"https://tttkmbb.com/api/v1/calculate/roof-pitch","schema":"https://tttkmbb.com/api/v1/calculators/roof-pitch","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-23"},"timestamp":"2026-09-23T23:32:26Z"}