Coding an ADA 2010 Section 405 Wheelchair Ramp (1:12 Slope) & Switchback Landing Geometry Engine in TypeScript
Wheelchair ramp layout math catches builders off guard because horizontal footprint grows 12x faster than vertical rise, and ADA 2010 Section 405 caps any single ramp run at 30 inches of rise before requiring a 60-inch l
Wheelchair ramp layout math catches builders off guard because horizontal footprint grows 12x faster than vertical rise, and ADA 2010 Section 405 caps any single ramp run at 30 inches of rise before requiring a 60-inch level intermediate landing. Modeling straight, 90-degree L-turn, and 180-degree U-switchback layouts in pure TypeScript lets you check yard or entry clearance before pouring concrete piers.
1. ADA Section 405 Geometry Constants & Types
export type RampSlopeMode = 'ada_1_12' | 'gentle_1_16' | 'res_1_10' | 'steep_1_8';
export type RampLayout = 'straight' | 'l_turn_90' | 'u_switchback_180';
const SLOPE_DENOM: Record<RampSlopeMode, number> = {
ada_1_12: 12,
gentle_1_16: 16,
res_1_10: 10,
steep_1_8: 8
};
export interface RampGeometryOutput {
slopeRatio: string;
slopePercent: number;
totalRampRunFt: number;
runSegments: number;
intermediateLandings: number;
handrailsRequired: boolean;
footprintLengthFt: number;
footprintWidthFt: number;
status: 'ada_compliant' | 'residential_steep' | 'violation';
}
2. Solving Intermediate Landings & 2D Bounding Boxes
Under ADA 405.6 and 405.7, any rise over 30" splits into Math.ceil(totalRiseIn / 30) sloped segments separated by 60" x 60" level turning landings, and handrails are required on both sides whenever rise exceeds 6":
export function solveAdaRamp(
totalRiseIn: number,
slopeMode: RampSlopeMode,
layout: RampLayout,
clearWidthIn = 36
): RampGeometryOutput {
const rise = Math.max(1, totalRiseIn);
const denom = SLOPE_DENOM[slopeMode];
const totalRunIn = rise * denom;
const runSegments = Math.max(1, Math.ceil(rise / 30));
const intermediateLandings = Math.max(0, runSegments - 1);
const topLandingIn = 60;
const midLandingIn = 60;
const overallWidthIn = Math.max(36, clearWidthIn) + 8; // allow posts + rails
let footprintLengthIn = totalRunIn + topLandingIn + intermediateLandings * midLandingIn;
let footprintWidthIn = overallWidthIn;
if (layout === 'l_turn_90') {
const leg1 = Math.ceil(totalRunIn / 2);
const leg2 = totalRunIn - leg1;
footprintLengthIn = leg1 + 60;
footprintWidthIn = leg2 + 60;
} else if (layout === 'u_switchback_180') {
const leg = Math.ceil(totalRunIn / 2);
footprintLengthIn = leg + 60;
footprintWidthIn = overallWidthIn * 2 + 6; // two parallel runs + central curb gap
}
const status =
clearWidthIn < 36 || slopeMode === 'steep_1_8' ? 'violation' :
slopeMode === 'res_1_10' ? 'residential_steep' : 'ada_compliant';
return {
slopeRatio: `1:${denom}`,
slopePercent: Math.round((100 / denom) * 100) / 100,
totalRampRunFt: Math.round((totalRunIn / 12) * 10) / 10,
runSegments,
intermediateLandings,
handrailsRequired: rise > 6,
footprintLengthFt: Math.round((footprintLengthIn / 12) * 10) / 10,
footprintWidthFt: Math.round((footprintWidthIn / 12) * 10) / 10,
status
};
}
3. Why Switchbacks Save Tight Front Yards
For a 48-inch porch height at 1:12 ADA slope (8.33%):
- A straight ramp requires
48 ftof sloped run plus a5 ftintermediate landing and5 fttop landing =58.0 ftstraight length. - Switching to
u_switchback_180folds the two24 ftlegs side by side with a60" x 60"turning landing, cutting total length to29.0 ftx7.8 ftso it fits neatly along a standard front porch elevation.
Interactive Tool & Exterior Reference Guide
- Check straight, L-turn, and U-switchback footprints live in the ADA Wheelchair Ramp Slope (1:12) & Landing Calculator.
- Read Engineering Spec #20: 2026 US Exterior Site & Accessory Construction Guide covering ADA ramps, pergolas, retaining walls, fences, gutters, and wood stoves.
- Draft outdoor entry decks, porches, and walkways in PlanCaliber Deck & Patio Floor Plans (
$0Free Studio with1400x1050watermarked proof PNG;$9Print Pass;$19full 5-sheet vector PDF +.DXF+.CSV; 14-day instant refunds at PlanCaliber Refunds).
Disclaimer: Preliminary space-planning and estimating geometry only, not licensed civil or structural engineering. Always verify ADA accessibility tolerances, frost footings, and local building codes on site with your local AHJ and qualified design professionals.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.