Skip to content
Yardox

Baseboard and trim calculator

Enter the wall runs and the length the shop sells. You get the number of lengths to buy and a cutting plan that wastes as little as possible, for baseboard, crown, casing or any trim.

Runs to cover

One line per straight run of wall. Leave out door openings; use the quantity for identical runs.

01
02
03

Trim as sold

The length printed on the label or in the shop listing.

in

The width of your saw blade. Leave 0 to ignore it.

Lengths to buy7 lengths· 8 ft
Add this calculator to your website

Free for any website: paste this code where the calculator should appear. It keeps itself up to date, fits its height to the content and links back to the full page with the explanations.

How to use it

  1. 01Measure each straight run of wall at floor level, from corner to corner or from a corner to the door casing. Doorways get no baseboard, so leave them out.
  2. 02Enter one line per run. If two walls are the same length, enter it once and set the quantity to 2.
  3. 03Enter the length of one piece as the shop sells it, for example 8 ft or 2.5 m. If you cut with a saw, enter the blade width so the plan leaves room for each cut.
  4. 04Read how many lengths to buy and follow the cutting plan: each bar is one piece from the shop, with the cuts in order and the offcut hatched.
  5. 05Copy the cut list and take it to the saw.

How it is calculated

This is a cutting problem, not an area problem. Dividing the total length by the piece length gives the least you could buy, but the real number depends on how the cuts fit into the pieces.

Run longer than a piece
parts = ⌈run / S⌉: (parts − 1) whole pieces + the rest
Lower bound
pieces ≥ ⌈Σ (cut + kerf) / (S + kerf)⌉
Plan
longest cuts first, each into the first piece it fits
Improve
search every assignment until the lower bound is reached

Each cut uses its own length plus one saw kerf, but the last cut on a piece may run to its end, which is why a piece holds S + kerf.

When the first plan already meets the lower bound, it cannot be beaten and we say so. Otherwise we search all the ways to assign the cuts and keep the one with the fewest pieces. For very long lists the search stops after a fixed budget and we tell you the plan may not be the best possible.

A run longer than one piece needs a joint. We use whole pieces and put the short rest at the end, so there is one joint per extra piece.

Worked example

A 14 × 12 ft room with a 3 ft door, 8 ft lengths

  1. Runs: 14 ft twice, 12 ft once, and 12 − 3 = 9 ft on the door wall. Total 49 ft.
  2. Each 14 ft run is 8 ft + 6 ft; the 12 ft run is 8 ft + 4 ft; the 9 ft run is 8 ft + 1 ft. Eight pieces to cut, four joints.
  3. Lower bound: ⌈49 / 8⌉ = 7 lengths. Plan: four lengths used whole, then 6 ft + 1 ft, 6 ft, and 4 ft. Seven lengths, 7 ft of offcuts.

Getting the order right

Buy the longest lengths you can carry

Fewer joints look better and take less time. If the shop sells two lengths, try both in the calculator and compare the offcut.

Put joints where they show least

A joint behind a sofa or near a corner is less visible than one in the middle of a long wall. Make the joint over a stud so both ends can be nailed.

Keep the offcuts until the job is done

A short offcut is often exactly what you need for a return at a door casing or a piece behind a radiator.

Common mistakes

  • Dividing the room perimeter by the piece length and buying that number: the cuts rarely fit that neatly.
  • Counting the doorways as baseboard.
  • Forgetting the saw kerf when the cuts nearly fill a piece.
  • Measuring at ceiling height for baseboard, or at floor level for crown: walls are not always plumb.

Questions

How many pieces of baseboard do I need for a 12 × 12 room?

With one 3 ft door and 8 ft lengths, the runs are 12, 12, 12 and 9 ft, 45 ft in total. That is at least 6 lengths. The plan: four whole 8 ft lengths, then the rests (4, 4, 4 and 1 ft) fit into two more, so 6 lengths.

Should I add 10 % for waste?

Not as a blind percentage. The cutting plan shows the real offcut for your room. If you are new to coping or mitring corners, buying one spare length is a better rule than a percentage.

Does this work for crown molding and door casing?

Yes. Any trim sold in fixed lengths works the same way: enter the runs, the piece length and the saw kerf.

What if a wall is longer than one piece?

The calculator splits it into whole pieces plus the rest and counts the joint. Join the pieces with a scarf joint over a stud.

Guides on this topic

Sources

  1. [1]Handbook 44, Appendix C: General Tables of Units of Measurement. National Institute of Standards and Technology (NIST). 1 ft = 12 in = 0.3048 m (exact). Checked November 6, 2026

Formulas and sources last checked on November 6, 2026. How we calculate