Nails & Numbers

HomeFlooring › Baseboard and Trim Calculator

Baseboard and Trim Calculator

IRC R302.9.1 names baseboard once, to exempt it

Every baseboard calculator adds up the walls, adds a waste percentage and divides by the stock length. That is arithmetic about a continuous material and baseboard is not one: a wall has to be made out of whole pieces, and the leftover from one length is only useful if some other wall is short enough to take it. On an ordinary 15 by 14 room in 8 ft stock the division says seven lengths and the answer is eight.

Baseboard packed into whole lengths

ft
ft
openings
ft
ft
lengths

There is no waste percentage on this page. Offcuts are counted by packing the actual walls into actual lengths, and the only allowance left is whole spare lengths, because you cannot buy 6% of a board.

Specification summary

Generated from on . Reopen that address to reproduce these figures exactly.

Entered

Result

These lengths are packed from the room you type in above.
Every length bought, and the offcut in each one

Worked example

A 15 ft by 14 ft room with one 3 ft door opening, 8 ft stock, coped inside corners, one spare length.

  1. Walls. 15, 14, 14 and, after the door, 12 ft.
  2. Run. 55 ft of baseboard.
  3. Divided. 55 ÷ 8 = 6.875, so 7 lengths.
  4. Packed. The 15 ft wall takes two whole lengths on its own, so 8.
  5. Offcut. 64 bought against 55 needed: 9 ft in the skip.
  6. Order. 8 plus one spare = 9 lengths.

One length in seven is 14% more material than the division says, on a plain rectangular room with no bay, no return and no chimney breast. Now change the stock to 12 ft and the two answers agree at five, because the walls happen to pack cleanly. That is the whole point: the gap is a property of your walls against your stock, not a percentage anybody can publish.

The formula

There is no formula, and that is the finding. The lower bound is a division and the answer is a packing:

lower bound = ⌈ Σw / s ⌉    answer = FFD(w, s) ≥ lower bound
w
the wall runs, each of which must come off whole pieces
s
stock length
FFD
first fit decreasing: longest wall first, into the first length with room
packing can equal the division and can never beat it
spare
whole lengths, ours, an input. A percentage cannot be bought

Fitting required lengths into as few stock lengths as possible is the one dimensional cutting stock problem, and it has no closed form. First fit decreasing is what a joiner does by eye, it runs instantly, and on rooms with few walls and long stock it lands on the optimum nearly always. It is not guaranteed to, and this page says so rather than claiming a solved problem.

Why the waste percentage had to go

A waste percentage is a way of not doing the calculation. It works for materials that are genuinely continuous, like paint or concrete, where 10% more is a real quantity you can order.

Trim is not continuous. It comes in fixed lengths, each wall has to come off whole pieces, and the offcut from a length is worth nothing unless another wall is short enough to use it. Ten percent of 55 feet is 5.5 feet, which is not a thing the yard sells and is not what you were short of anyway.

So this page packs the actual walls into actual lengths and reports how many lengths that takes. The offcut falls out of the packing rather than being guessed at, and it is shown, because seeing 9 feet of unusable board is the argument for buying 12 ft stock.

What is left of the allowance is spare lengths: whole boards, bought against a miscut or a split. That is a real quantity, it is this page's own figure, it defaults to one, and it is an input.

One worked room, packed against divided, at four stock lengths
Stock lengthTotal divided by stockPacked into whole piecesDifferenceMaterial boughtOffcut left over
8 ft781 more64 ft9 ft
12 ft55same60 ft5 ft
14 ft44same56 ft1 ft
16 ft44same64 ft9 ft

Read 2026-09-09. This table is arithmetic rather than a source: the same four walls run through a division and through a first fit decreasing packer.

Download this table as CSV. Same cells as printed above, nothing added.

Total feet divided by stock length is the wrong answer

Every baseboard calculator adds up the runs, adds a waste percentage and divides by the stock length. That is arithmetic about a continuous material, and this is not one.

A wall has to be made out of whole pieces. The leftover from one length is only useful if some other wall is short enough to take it, and on most rooms nothing is.

Take the worked room: walls of 15, 14, 14, 12 ft, 55 ft in total, in 8 ft stock.

Divided, that is 55 / 8 = 6.875, so 7 lengths. Packed into whole pieces it is 8, because the 15 ft wall takes two whole lengths on its own and the offcuts left over are too short to be any other wall.

The same room at each common stock length
Stock lengthTotal divided by stockPacked into whole piecesDifferenceMaterial boughtOffcut left over
8 ft781 more64 ft9 ft
12 ft55same60 ft5 ft
14 ft44same56 ft1 ft
16 ft44same64 ft9 ft

Read the difference column. The gap is not a constant and it is never negative: packing can equal the division and it can never beat it. On this room the longer stock closes it, which is the practical answer and also the more expensive one per foot.

Cope or mitre, and why it changes the failure rather than the quantity

An inside corner in baseboard can be mitred or coped, and the choice barely moves the material. It moves what happens in five years.

A mitre is two 45 degree cuts meeting in the corner. Fast, needs one saw setting, and it assumes the corner is 90 degrees. Corners are not 90 degrees: drywall builds up in the angle and framing moves, so the joint that closed on the bench opens on the wall.

A cope leaves one piece square into the corner and profiles the other over it. Slower, needs a coping saw or a grinder, and the profiled piece can be shaved until it fits whatever the corner actually is. It also stays closed as the wood shrinks, because the profiled piece slides along the square one rather than opening away from it.

Outside corners cannot be coped. They are a mitre or nothing, which is why they are the first joint to open on a dry winter and why they get glued.

The calculator counts corners either way. It does not change the packing, because the length consumed at a corner is the same to within a saw kerf.

Buy the room in one go, from one batch

Two practical constraints that the arithmetic does not see.

Profiles drift between production runs. Two pieces of nominally identical baseboard from different batches will not meet cleanly at a scarf, and a coped joint between them will not close at all, because the cope is cut to match a specific profile. Buy the whole room at once and check that the bundle is one run.

And species and moisture matter more than the profile. Trim delivered from a cold yard into a heated house shrinks across its width for weeks. That is why a joint that was perfect on installation day opens in February, and why finish carpenters leave material in the room before they cut it.

The stock length is a real decision, not a default. Longer stock packs better, costs more per foot, and needs a vehicle. Run the calculator at 8, 12 and 16 and look at the offcut column before choosing: on some rooms the longer board buys fewer joints AND less waste, and on others it just buys a longer thing in the skip.

How the packing is done, and why it is not exact

Fitting a set of required lengths into as few stock lengths as possible is the one dimensional cutting stock problem. It has no closed form, and finding the true optimum needs a search that grows badly with the number of pieces.

What this page uses is first fit decreasing: sort the walls longest first, then put each one into the first opened length that still has room for it, opening a new length only when none does.

That is what a joiner does by eye, it runs instantly, and it has a useful property: it never needs more lengths than the division says, and usually needs more than nothing. So the answer sits between the division, which is a lower bound, and the truth.

It is not guaranteed optimal. On a contrived set of lengths a better arrangement exists, and the page says so rather than claiming a solved problem. On real rooms, where walls are few and stock is long, first fit decreasing lands on the optimum nearly always.

What it does not model is the saw kerf, which is real and is roughly an eighth of an inch a cut, or the fact that a badly cut end can be recut shorter. Both are small against one whole length, and both point the same way: buy the packed number, not the divided one.

The joint in the middle of a long wall

When a wall is longer than the stock, the baseboard on it has a joint in the middle whether you like it or not. How that joint is made changes both the look and the quantity.

A scarf is two 45 degree cuts in the same direction, overlapping. As the wood shrinks the joint slides rather than opening, so the seam stays closed and is far less visible than a butt. It costs a little length, because the overlap is not free.

A butt joint is two square ends together. It is faster, it needs no setup, and it opens into a dark line the first dry winter. On paint grade work people fill it; on stain grade it is visible forever.

Put the joint over a stud, so both pieces can be nailed through the overlap, and put it away from the eye: not in the middle of the wall you look at from the door.

The packer above assumes a run longer than the stock is made from whole lengths plus a remainder, which is what a scarfed run actually consumes.

Baseboard appears in the code once, and it is to be let off

There is no code table for baseboard. No minimum height, no profile, no fastening schedule, no joint. Search the residential code for the word and it turns up in exactly one place, and what it says there is that the rule does not apply:

Flame spread index. Wall and ceiling finishes shall have a flame spread index of not greater than 200. Exception: Flame spread index requirements for finishes shall not apply to trim defined as picture molds, chair rails, baseboards and handrails; to doors and windows or their frames; or to materials that are less than 1/28 inch (0.91 mm) in thickness cemented to the surface of walls or ceilings if these materials exhibit flame spread index values not greater than those of paper of this thickness cemented to a noncombustible backing.

Everything else on that wall has to test at a flame spread index of 200 or less. Trim does not, and the exception names picture molds, chair rails, baseboards and handrails specifically, along with doors and windows and their frames.

Read where the exception sits. It is written under R302.9.1, which is the flame spread section. The smoke-developed limit is a separate section:

Smoke-developed index. Wall and ceiling finishes shall have a smoke-developed index of not greater than 450.

That section carries no exception for trim, and the code does not restate the R302.9.1 exception under it. Whether the 450 smoke-developed limit is intended to reach trim is a question for the building official rather than for this page, and it is worth knowing the text reads that way before somebody asks.

Testing for both is by ASTM E84 or UL 723 under R302.9.3.

Which is the honest summary of the regulatory position: the quantity on this page is arithmetic, not compliance. Nothing about how much baseboard you buy or how you join it is governed, and the one thing the code has to say about the material is that it is excused.

The source

Read 2026-09-09. Seattle Residential Code, Chapter 3, Building Planning, Section R302.9, City of Seattle, adopting the 2018 International Residential Code. Prints IRC Chapter 3 in full. Section R302.9.1 is the only place in the residential code that names baseboards, and it names them in order to exempt them from the flame spread index requirement that applies to everything else on the wall.

Seattle is used because codes.iccsafe.org returns HTTP 403 and cannot be fetched, and because a city that publishes its adopted code as a PDF states its edition and jurisdiction on the document rather than serving whichever state it feels like. Your jurisdiction may amend this. Check the edition your building department has adopted before relying on any section number.

The packing arithmetic on this page is not from any code and does not need to be. It is a lower bound problem you can verify with a pencil.

Frequently asked questions

How do I calculate how much baseboard I need?
Add up the wall runs, take out the door openings, and then pack those runs into whole stock lengths rather than dividing. Dividing the total by the stock length is a lower bound: it assumes every offcut finds a home, and on most rooms none of them do. On a 15 by 14 room with one door, in 8 ft stock, the division says 7 lengths and the packing needs 8.
How much extra baseboard should I buy for waste?
Not a percentage. Once the offcuts are counted by packing, what is left is the risk of a miscut or a split board, and that is a whole spare length rather than a fraction of one. This page defaults to one spare, which is its own figure and is an input.
Should baseboard corners be coped or mitred?
Coped inside corners are more forgiving of a corner that is out of square and stay closed as the wood shrinks. Mitred corners are faster and open into a visible gap when either of those happens. Outside corners cannot be coped and are always mitred, which is why they are the first joint to open.
What lengths does baseboard come in?
Commonly 8, 12, 14 and 16 ft, and which lengths a yard stocks varies by profile. It matters more than the price per foot on rooms with walls longer than the stock, because a wall longer than one length needs a joint in the middle of it.
Do I subtract door openings from baseboard?
Yes, the width of the opening including the casing, because no baseboard runs across a doorway. This page takes the openings out of the longest walls. Do not subtract windows unless they run to the floor.
How do you join baseboard on a long wall?
With a scarf: both ends mitred at 45 degrees in the same direction so they overlap, rather than butted square. The overlap slides as the wood shrinks so the seam stays closed, where a butt joint opens into a dark line. Put the joint over a stud and away from the wall you look at from the door.
Why does my calculator disagree with the yard's estimate?
Usually because one of you divided and the other packed. A yard that has cut trim for thirty years counts lengths against walls without thinking about it, and gets a number that a division cannot reach. This page does the same thing explicitly and shows the offcut it implies.
Does the stock length change how much I spend?
Often, and not always in the direction you expect. Longer stock packs better and leaves fewer joints, but it usually costs more per foot and can leave a longer unusable offcut. Run this calculator at each length your yard stocks and compare the material bought column.

Check these numbers yourself

How every figure here is verified: Sources & Method. Who builds this: About. Found something wrong? Tell us and it gets fixed or removed.

Figures on this page last checked against the source documents on 2026-09-09. Codes are amended locally; confirm against the edition your jurisdiction enforces.

Related calculators

There is no code table for baseboard. No minimum height, no profile, no fastening schedule and no joint. IRC R302.9.1, quoted here from the Seattle Residential Code as read on 9 September 2026, names baseboards only to exempt trim from the flame spread index requirement, and the separate smoke-developed section carries no such exception. Your jurisdiction may amend this; check the edition your building department has adopted. The packing is first fit decreasing over your own wall runs and is not guaranteed optimal, which the page states rather than claiming a solved problem. The spare lengths are this page's own allowance and are an input. Saw kerf is not modelled.