How the calculation works
Outside box width = (section width − left margin − right margin − gaps between columns) / columns; height works the same way. For N boxes, cut 2N horizontal pieces and 2N vertical pieces measured at the long points of 45° miters. Total long-edge trim = 2N × (box width + box height). Flat trim: for smaller included angle C, each equal miter setting measured from a square cut is (180 − C) / 2; the cut line makes C / 2 with the length edge. Budget = length × (1 + allowance / 100) × price per matching length unit + hours × hourly rate + supplies + other entered costs.
A worked example
A 120 × 96 in section with 6 in side margins, 8 in top/bottom margins, three columns, one row, and 6 in gaps gives three 32 × 80 in outside boxes. Six 32 in and six 80 in long-point pieces total 56 ft. Adding an illustrative 10% allowance gives 61.6 ft. A 120° included flat-trim corner needs two equal 30° settings from square. For 56 ft plus 10% allowance at 2 per ft, trim costs 123.20. Four hours at 30, plus 25 supplies and 15 other costs, total 283.20 in the chosen currency.
Before you use the result
These are decorative wall rectangles, not frames for artwork. All gaps and margins run to box outside edges, within your measured usable section. Check outlets, switches, doors, and uneven walls before cutting. Trim totals are linear estimates, not a whole-stick cutting optimizer; kerf, defects, stock lengths and offcuts affect purchases. The example margins and allowance are editable, not installation requirements. Corner mode assumes equal-width flat trim, two straight runs and a symmetrical joint. Enter the smaller included angle between the runs, not a reflex angle or the saw setting. It reports setting magnitudes only; mirror the cuts and follow your saw manual for workpiece position, side to retain and available angle range. It does not calculate compound crown cuts, coped joints, curved walls or sloped ceilings. Test the fit with scrap before cutting finished pieces. Budget mode uses a continuous-length price estimate, not a whole-stick shopping list or an installation quote. Enter allowance once; price quotes, labor and all other costs are yours. Budget entries support up to nine fractional decimal places.