{"success":true,"version":"v1","request":{"tool":"get_calculator_schema","calculator_id":"stairs"},"result":{"entity_type":"calculator","id":"stairs","calculator_id":"stairs","canonical_url":"https://tttkmbb.com/construction/stairs","name":"Stair Calculator","title":"Stair Calculator – Risers, Riser Height, Treads, Total Run and Stringer Length with IRC Check","category":"construction","category_name":"Construction & Home","tool_name":"calculate_stair_dimensions","featured_mcp_tool":false,"description":"Divides a total floor-to-floor rise into equal risers close to a target riser height, derives the tread count, total run, stringer length and stair angle, and checks the result against the IRC residential limits (riser ≤ 7¾ in / 196 mm, tread ≥ 10 in / 254 mm) and the 2R + T comfort rule.","use_when":"You are laying out a straight flight of interior or deck stairs and need the number of risers, the exact riser height, the total run and the stringer length.","do_not_use_when":"The stair has winders, landings or curves (design each straight flight separately), or you need a roof/rafter slope (use roof-pitch).","inputs":[{"name":"unit_system","label":"Unit system","type":"enum","required":false,"default":"metric","values":[{"value":"metric","label":"Metric (m, cm, mm, m²)","aliases":["si","metres","meters"]},{"value":"imperial","label":"Imperial / US customary (ft, in, ft²)","aliases":["us","feet","inches"]}],"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems.","example":"metric"},{"name":"total_rise","label":"Total rise","type":"number","unit":"cm or in","required":true,"max":2000,"exclusive_min":0,"description":"Finished-floor to finished-floor height in centimetres (metric) or inches (imperial).","example":270},{"name":"ideal_riser_height","label":"Target riser height","type":"number","unit":"cm or in","required":false,"max":40,"exclusive_min":0,"description":"Preferred riser height; the riser count is total_rise / this value rounded to the nearest whole number. Default 18 cm (metric) or 7 in (imperial).","example":18},{"name":"tread_depth","label":"Tread depth (going)","type":"number","unit":"cm or in","required":false,"max":100,"exclusive_min":0,"description":"Horizontal depth of each tread, nosing to nosing. Default from the comfort rule: 63 cm − 2 × riser (metric) or 25 in − 2 × riser (imperial).","example":27}],"outputs":[{"name":"risers","label":"Number of risers","type":"integer","decimals":4,"description":"round(total_rise / ideal_riser_height), at least 1."},{"name":"treads","label":"Number of treads","type":"integer","decimals":4,"description":"risers − 1 (the upper floor acts as the last tread)."},{"name":"riser_height_cm","label":"Riser height","type":"number","unit":"cm","decimals":2,"description":"total_rise / risers."},{"name":"riser_height_in","label":"Riser height","type":"number","unit":"in","decimals":3,"description":"Riser height in inches."},{"name":"tread_depth_cm","label":"Tread depth","type":"number","unit":"cm","decimals":2,"description":"Tread depth used."},{"name":"tread_depth_in","label":"Tread depth","type":"number","unit":"in","decimals":3,"description":"Tread depth in inches."},{"name":"total_run_cm","label":"Total run","type":"number","unit":"cm","decimals":1,"description":"treads × tread_depth (horizontal length of the flight)."},{"name":"total_run_in","label":"Total run","type":"number","unit":"in","decimals":2,"description":"Total run in inches."},{"name":"stringer_length_cm","label":"Stringer length","type":"number","unit":"cm","decimals":1,"description":"√(total_rise² + total_run²), the sloped length of the flight."},{"name":"stringer_length_in","label":"Stringer length","type":"number","unit":"in","decimals":2,"description":"Stringer length in inches."},{"name":"stair_angle_degrees","label":"Stair angle","type":"number","unit":"°","decimals":2,"description":"atan(total_rise / total_run)."},{"name":"comfort_check","label":"Comfort rule (2R + T)","type":"string","decimals":4,"description":"Whether 2 × riser + tread falls in the 63–65 cm (24–25 in) comfort range."},{"name":"code_check","label":"IRC check","type":"string","decimals":4,"description":"Comparison with IRC R311.7.5: riser ≤ 7¾ in (196 mm), tread ≥ 10 in (254 mm)."}],"input_schema":{"type":"object","properties":{"unit_system":{"description":"Unit system of the length inputs (metric: m / cm / mm; imperial: ft / in). Outputs are reported in both systems.","type":"string","enum":["metric","imperial"],"default":"metric","examples":["metric"]},"total_rise":{"description":"Finished-floor to finished-floor height in centimetres (metric) or inches (imperial). Unit: cm or in.","type":"number","maximum":2000,"exclusiveMinimum":0,"examples":[270],"x-unit":"cm or in"},"ideal_riser_height":{"description":"Preferred riser height; the riser count is total_rise / this value rounded to the nearest whole number. Default 18 cm (metric) or 7 in (imperial). Unit: cm or in.","type":"number","maximum":40,"exclusiveMinimum":0,"examples":[18],"x-unit":"cm or in"},"tread_depth":{"description":"Horizontal depth of each tread, nosing to nosing. Default from the comfort rule: 63 cm − 2 × riser (metric) or 25 in − 2 × riser (imperial). Unit: cm or in.","type":"number","maximum":100,"exclusiveMinimum":0,"examples":[27],"x-unit":"cm or in"}},"additionalProperties":false,"required":["total_rise"]},"output_schema":{"type":"object","properties":{"risers":{"description":"round(total_rise / ideal_riser_height), at least 1.","type":"integer"},"treads":{"description":"risers − 1 (the upper floor acts as the last tread).","type":"integer"},"riser_height_cm":{"description":"total_rise / risers. Unit: cm.","type":"number","x-unit":"cm"},"riser_height_in":{"description":"Riser height in inches. Unit: in.","type":"number","x-unit":"in"},"tread_depth_cm":{"description":"Tread depth used. Unit: cm.","type":"number","x-unit":"cm"},"tread_depth_in":{"description":"Tread depth in inches. Unit: in.","type":"number","x-unit":"in"},"total_run_cm":{"description":"treads × tread_depth (horizontal length of the flight). Unit: cm.","type":"number","x-unit":"cm"},"total_run_in":{"description":"Total run in inches. Unit: in.","type":"number","x-unit":"in"},"stringer_length_cm":{"description":"√(total_rise² + total_run²), the sloped length of the flight. Unit: cm.","type":"number","x-unit":"cm"},"stringer_length_in":{"description":"Stringer length in inches. Unit: in.","type":"number","x-unit":"in"},"stair_angle_degrees":{"description":"atan(total_rise / total_run). Unit: °.","type":"number","x-unit":"°"},"comfort_check":{"description":"Whether 2 × riser + tread falls in the 63–65 cm (24–25 in) comfort range.","type":"string"},"code_check":{"description":"Comparison with IRC R311.7.5: riser ≤ 7¾ in (196 mm), tread ≥ 10 in (254 mm).","type":"string"}}},"formula":"risers = round(total_rise / ideal_riser_height); riser = total_rise / risers; treads = risers − 1; total_run = treads × tread_depth; stringer = √(total_rise² + total_run²); angle = atan(total_rise / total_run); comfort: 63 cm ≤ 2·riser + tread ≤ 65 cm (24–25 in).","method":"The 2R + T rule (Blondel, 1675) approximates a natural stride; the IRC limits are the US one- and two-family dwelling maximums (R311.7.5.1–.2), with a 3/8 in (9.5 mm) allowed variation between risers. UK Part K allows risers 150–220 mm and goings ≥ 220 mm for private stairs.","sources":[{"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"},{"name":"Wikipedia – Stairs (dimensions and the 2R + T rule)","url":"https://en.wikipedia.org/wiki/Stairs","type":"reference","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":"106 in rise, 7 in target riser, 10.5 in treads","inputs":{"unit_system":"imperial","total_rise":106,"ideal_riser_height":7,"tread_depth":10.5},"expected":{"risers":15,"treads":14,"riser_height_in":7.067,"riser_height_cm":17.95,"total_run_in":147,"stringer_length_in":181.23,"stair_angle_degrees":35.8,"comfort_check":"2R + T = 24.63 in: within the 24–25 in comfort range","code_check":"Meets IRC R311.7.5 (riser 7.07 in ≤ 7.75 in, tread 10.5 in ≥ 10 in)"},"url":"https://tttkmbb.com/api/v1/calculate/stairs?unit_system=imperial&total_rise=106&ideal_riser_height=7&tread_depth=10.5"},{"name":"270 cm rise, 18 cm target riser, 27 cm treads","inputs":{"unit_system":"metric","total_rise":270,"ideal_riser_height":18,"tread_depth":27},"expected":{"risers":15,"treads":14,"riser_height_cm":18,"riser_height_in":7.087,"total_run_cm":378,"stringer_length_cm":464.5,"stair_angle_degrees":35.54,"comfort_check":"2R + T = 63 cm: within the 63–65 cm comfort range"},"url":"https://tttkmbb.com/api/v1/calculate/stairs?unit_system=metric&total_rise=270&ideal_riser_height=18&tread_depth=27"}],"faq":[{"q":"Why is the number of treads one less than the risers?","a":"The top riser lands on the upper floor, which serves as the final walking surface, so a flight with n risers has n − 1 treads (unless the top tread is a separate landing board)."},{"q":"Which rise do I measure?","a":"From finished floor to finished floor, including floor coverings on both levels; a 20 mm difference in finish thickness would otherwise create an uneven first or last step."},{"q":"Is the IRC check valid outside the USA?","a":"The limits are from the US residential code. Many other codes are similar but not identical (e.g. UK Part K max riser 220 mm, min going 220 mm), so verify against the local code."}],"tags":["stair calculator","riser height","tread depth","stringer length","number of steps","stair stringer"],"related":[{"calculator_id":"roof-pitch","reason":"Rise-over-run conversions for roofs."},{"calculator_id":"right-triangle","reason":"Solve the stringer triangle directly."},{"calculator_id":"decking","reason":"Deck material for the platform the stairs serve."}],"links":{"html":"https://tttkmbb.com/construction/stairs","markdown":"https://tttkmbb.com/construction/stairs.md","json":"https://tttkmbb.com/construction/stairs.json","api":"https://tttkmbb.com/api/v1/calculate/stairs","schema":"https://tttkmbb.com/api/v1/calculators/stairs","openapi":"https://tttkmbb.com/openapi.json","mcp":"https://tttkmbb.com/mcp"},"version":"v1","updated_at":"2026-09-23"},"timestamp":"2026-09-23T23:23:50Z"}