Dev.to WebDev πŸ›  Dev πŸ‘ 0 πŸ“– 3 min read

Tiny House CAD Envelopes in TypeScript: DOT 8'-6" Road Limits, IRC Appendix Q Loft Headroom, and Alternating-Tread Stair Math

Drafting a tiny house on wheels (8x24) or compact foundation (16x32) leaves zero wasted inches. On a trailer build, crossing 8'-6" (102") exterior width or 13'-6" (162") road height turns a highway-legal tiny house into

Drafting a tiny house on wheels (8x24) or compact foundation (16x32) leaves zero wasted inches. On a trailer build, crossing 8'-6" (102") exterior width or 13'-6" (162") road height turns a highway-legal tiny house into a permitted oversize load across US states. Meanwhile, inside the shell, standard 7-3/4" rise / 10" run stairs consume nearly 11 feet of linear floor length unless you model IRC Appendix Q (Tiny Houses) compact loft stairs and ladders cleanly.

When building PlanCaliber's tiny house floor plan studio, we encoded DOT highway bounding-box checks, wall-thickness interior net-width losses, and IRC Appendix Q loft headroom and steep-stair formulas directly in TypeScript.

1. US DOT Highway Envelope & Net Interior Width Solver

A standard 8'-6" (102") road-legal trailer shell loses wall depth fast: two 2x4 framed walls (3.5" studs + 0.5" exterior sheathing + 0.75" siding + 0.5" interior shiplap = 5.25" per side -> 10.5" total) trim interior wall-to-wall width to 91.5" (7'-7.5"). Overlooking exterior siding overhang or wheel-well fender boxes breaks cabinet and shower fits immediately:

export interface TinyHouseShellInput {
  exteriorLengthFt: number;
  exteriorWidthIn: number;        // max 102" (8'-6") DOT without wide-load permit
  trailerDeckHeightIn: number;    // typically 22"-26" above road surface
  totalStructureHeightIn: number; // floor framing + main wall + loft + roof peak
  wallAssemblyThickIn: number;    // e.g. 5.25" per side (2x4 + sheathing + siding + finish)
  roofAssemblyThickIn: number;    // e.g. 8.5" rafters + insulation + roofing
  mainFloorClearHeightIn: number; // e.g. 80" (6'-8" IRC App Q min)
  loftFloorAssemblyIn: number;    // e.g. 6.25" (2x6 joists + 3/4" ply)
}

export interface TinyHouseEnvelopeReport {
  netInteriorWidthIn: number;
  netInteriorSqFt: number;
  totalRoadHeightIn: number;
  remainingLoftPeakHeightIn: number;
  passesDotWidth: boolean;
  passesDotHeight: boolean;
  passesAppQMainCeiling: boolean;
  warnings: string[];
}

export function validateTinyHouseEnvelope(input: TinyHouseShellInput): TinyHouseEnvelopeReport {
  const warnings: string[] = [];
  const netInteriorWidthIn = input.exteriorWidthIn - input.wallAssemblyThickIn * 2;
  const netInteriorLengthIn = input.exteriorLengthFt * 12 - input.wallAssemblyThickIn * 2;
  const netInteriorSqFt = (netInteriorWidthIn * netInteriorLengthIn) / 144;

  const totalRoadHeightIn = input.trailerDeckHeightIn + input.totalStructureHeightIn;
  const remainingLoftPeakHeightIn =
    input.totalStructureHeightIn -
    input.mainFloorClearHeightIn -
    input.loftFloorAssemblyIn -
    input.roofAssemblyThickIn;

  const passesDotWidth = input.exteriorWidthIn <= 102;
  const passesDotHeight = totalRoadHeightIn <= 162;
  const passesAppQMainCeiling = input.mainFloorClearHeightIn >= 80; // IRC AQ103.1: 6'-8" habitable min

  if (!passesDotWidth) {
    warnings.push(`Exterior width ${input.exteriorWidthIn}" exceeds 102" (8'-6") US DOT highway limit.`);
  }
  if (!passesDotHeight) {
    warnings.push(`Total road height ${totalRoadHeightIn}" exceeds 162" (13'-6") US DOT bridge clearance limit.`);
  }
  if (!passesAppQMainCeiling) {
    warnings.push(`Main floor height ${input.mainFloorClearHeightIn}" is below 80" (6'-8") IRC Appendix Q minimum.`);
  }
  if (remainingLoftPeakHeightIn < 36) {
    warnings.push(`Loft peak headroom ${remainingLoftPeakHeightIn.toFixed(1)}" is tight for sitting up on an 8" mattress.`);
  }

  return {
    netInteriorWidthIn: Number(netInteriorWidthIn.toFixed(1)),
    netInteriorSqFt: Number(netInteriorSqFt.toFixed(1)),
    totalRoadHeightIn: Number(totalRoadHeightIn.toFixed(1)),
    remainingLoftPeakHeightIn: Number(remainingLoftPeakHeightIn.toFixed(1)),
    passesDotWidth,
    passesDotHeight,
    passesAppQMainCeiling,
    warnings,
  };
}

Run the numbers on a 24-foot trailer with 24" deck height and 136" structure height (160" road height, PASS under 162"): after 80" main-floor height (6'-8" IRC AQ103.1), 6.25" loft floor joists, and 8.5" insulated roof assembly, your sleeping loft peaks at 41.25" clear, enough to sit up comfortably over a low-profile 6" mattress while staying road-legal nationwide!

2. IRC Appendix Q Loft Stairway Slope & Footprint Solver

Under IRC Appendix Q (Section AQ104.2) for dwellings <= 400 sq ft, sleeping loft stairs allow steeper risers (7" to 12") governed by the exact relationship R = 20 - T (where riser R plus tread T equals 20"):

export interface AppQLoftStairResult {
  riserCount: number;
  riserHeightIn: number;
  treadDepthIn: number;
  totalHorizontalRunIn: number;
  minStairWidthIn: number;
  passesAppQ: boolean;
}

export function solveAppendixQLoftStairs(
  floorToLoftTopIn: number,
  targetRiserHeightIn = 9.5
): AppQLoftStairResult {
  const riserCount = Math.ceil(floorToLoftTopIn / targetRiserHeightIn);
  const riserHeightIn = floorToLoftTopIn / riserCount;
  // IRC AQ104.2.1: Tread depth = 20 - (4/3)*R, minimum 6.25"
  const treadDepthIn = Math.max(6.25, 20 - (4 / 3) * riserHeightIn);
  const totalHorizontalRunIn = (riserCount - 1) * treadDepthIn;
  const passesAppQ = riserHeightIn >= 7 && riserHeightIn <= 12 && treadDepthIn >= 6.25;

  return {
    riserCount,
    riserHeightIn: Number(riserHeightIn.toFixed(2)),
    treadDepthIn: Number(treadDepthIn.toFixed(2)),
    totalHorizontalRunIn: Number(totalHorizontalRunIn.toFixed(1)),
    minStairWidthIn: 17, // IRC AQ104.2.2 min clear width at handrail
    passesAppQ,
  };
}

For an 86.25" floor-to-loft vertical climb, standard IRC stairs demand 110" (9'-2") of horizontal floor run, whereas an Appendix Q storage staircase (10 risers at 8.63" rise, 8.5" tread) climbs the same height in 76.5" (6'-4.5") while creating 16+ cu ft of built-in wardrobe storage beneath the treads! You can also check standard residential stair stringers in our staircase rise and run calculator and framing takeoff in our wall stud & drywall calculator.

Drafting Your Tiny House or Foundation Cabin in 2D and 3D

Start directly inside our pre-built 8x24 Tiny House on Wheels Template or 16x32 Foundation Tiny House Template in PlanCaliber. Inspect furniture, kitchenette, and loft proportions in live 3D and save watermarked proof PNGs free. Optional one-time passes unlock clean unwatermarked 2-sheet 1/4"=1'-0" vector PDFs ($9) or full 5-sheet CAD PDFs + 8-layer AutoCAD R12 .DXF files ($INSUNITS=1 US inches) + 3D .OBJ models + framing/drywall CSVs ($19), with permanent edits and 14-day instant refunds.

All plans and calculators are for preliminary space planning and estimating; always verify trailer axle weight ratings, local IRC Appendix Q adoption, ANSI/RVIA standards, and egress requirements with your local building official (AHJ).

πŸ“° Read the original article on Dev.to WebDev

Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.