Raised bed lumber calculator: how many boards to buy and how to cut them
Divide the bed height by the actual board width and round up to get the number of courses; each course needs two long sides and two short sides (width minus twice the board thickness). A 4 x 8 ft bed, 11 inches tall, in 2x6 lumber (actually 1.5 x 5.5 in) needs 2 courses: 6 boards of 8 ft by the cut plan, 7 with a 10 % waste allowance.

Key points
- Courses = ceiling(bed height / actual board width): a 2x6 is 5.5 inches wide, so 11 inches takes 2 courses and 12 inches takes 3.
- Nominal sizes are not actual sizes: the Wood Handbook table gives a dry 2x6 as 1-1/2 x 5-1/2 in (38 x 140 mm).
- Short sides are cut to bed width minus twice the board thickness, so they butt between the long boards.
- The cut plan packs pieces into stock boards largest first (first-fit decreasing), ignoring the saw kerf.
- Waste allowance (default 10 %) and corner posts (courses x board width long) are adjustable.
What the lumber calculator computes
The raised bed lumber calculator turns the outside length and width of a bed, its target height and the actual size of your boards into a board count, a cut list and a cut plan. It answers three questions: how many courses (stacked rows of boards) the walls need, which pieces to cut, and how many stock boards of a given length to buy once the pieces are packed into them.
Optionally it adds four corner posts and shows their length. The default values describe the classic 4 x 8 ft bed in 2x6 lumber: 8 ft long, 4 ft wide, 11 inches tall, boards 5.5 inches wide and 1.5 inches thick, bought in 8 ft lengths, with a 10 % waste allowance.
Nominal vs actual board sizes
Lumber in the United States is sold by nominal size, but the calculator needs the actual size, which is smaller. The American Softwood Lumber Standard (PS 20) sets the actual thickness and width; the USDA Wood Handbook reproduces the standard sizes for yard and structural lumber in its Table 6-6.
| Nominal | Minimum dressed size, dry | Metric |
|---|---|---|
| 1x (board) thickness | 3/4 in | 19 mm |
| 2x thickness | 1-1/2 in | 38 mm |
| 4x thickness | 3-1/2 in | 89 mm |
| 4 in width | 3-1/2 in | 89 mm |
| 6 in width | 5-1/2 in | 140 mm |
| 8 in width | 7-1/4 in | 184 mm |
| 10 in width | 9-1/4 in | 235 mm |
| 12 in width | 11-1/4 in | 286 mm |
So a 2x6 is 1-1/2 x 5-1/2 in and a 4x4 post is 3-1/2 x 3-1/2 in. The Southern Pine Inspection Bureau summarises the same rule: 2x4 and 2x6 lumber is 1/2 inch less than nominal in width, while 2x8, 2x10 and 2x12 are 3/4 inch less. The Wood Handbook adds that “dry” means dried to a maximum of 19 % moisture content, and that lumber surfaced green is cut slightly larger so that it shrinks to about the dry size. Because the table gives minimum sizes, measure a board from your own stack and type that value. For how thick the boards should be in the first place, see raised bed board thickness.
The Wood Handbook also notes that retail yards commonly stock dimension lumber in 8 to 18 ft lengths, in multiples of 2 ft. The calculator accepts any stock length; 8, 10 and 12 ft are the usual choices for a bed.
The formulas
The calculator works in inches (US mode) or centimetres (metric mode), using 1 in = 2.54 cm and 1 ft = 30.48 cm, both exact NIST values.
Courses
- courses = ceiling(H / w), where H is the target height and w the actual board width
- actual height = courses x w
Pieces per course (butt joints, long sides running the full length)
- 2 long sides of length L
- 2 short sides of length W - 2t, where t is the actual board thickness, so they fit between the long boards
Cut plan: first-fit decreasing
- List every piece: 2 x courses long sides and 2 x courses short sides.
- Sort them from longest to shortest.
- Put each piece in the first stock board that still has enough length left; if none has, start a new board.
- The number of boards used is the cut-plan count; the leftover on each board is its offcut. The saw kerf is ignored.
If any single piece is longer than the stock length, the calculator stops and asks for longer stock or a splice.
Boards to buy
- boards to buy = ceiling(cut-plan boards x (1 + waste / 100))
Corner posts (optional)
- 4 posts, each courses x w long, flush with the top board, cut from separate post stock
Assumptions and defaults
Each default below is either taken from the lumber standard or is a planning setting you can change.
| Setting | Default | Basis |
|---|---|---|
| Board width | 5.5 in (2x6) | Wood Handbook Table 6-6 |
| Board thickness | 1.5 in (2x) | Wood Handbook Table 6-6 |
| Stock length | 8 ft | Retail lengths 8 to 18 ft (Wood Handbook) |
| Waste allowance | 10 % | Editorial default for rejected or damaged boards, adjustable |
| Kerf | 0 | Ignored by design |
| Corner posts | off | Length = courses x board width |
The 10 % waste allowance is not a sourced figure: it is a margin for a board you reject at the yard for a split, a large knot or a twist, or for a cut that goes wrong. Set it to 0 if you hand-pick your boards.
Worked example
This example uses the calculator’s default values so you can follow the arithmetic.
Bed: 8 ft x 4 ft outside (96 x 48 in), 11 in tall, 2x6 boards (5.5 x 1.5 in), 8 ft stock (96 in), 10 % waste.
- Courses: 11 / 5.5 = 2, so 2 courses; actual height 2 x 5.5 = 11 in.
- Long sides: 2 per course x 2 courses = 4 pieces of 96 in.
- Short sides: 48 - 2 x 1.5 = 45 in; 4 pieces of 45 in.
- Cut plan (largest first): boards 1 to 4 each take one 96 in piece (offcut 0); board 5 takes 45 + 45 in (offcut 6 in); board 6 takes 45 + 45 in (offcut 6 in). Total: 6 boards, 12 in of offcuts.
- Boards to buy: 6 x 1.10 = 6.6, rounded up to 7.
- Corner posts (if selected): 4 pieces of 2 x 5.5 = 11 in.
Same bed with 12 ft stock (144 in). Each board takes one 96 in piece and one 45 in piece (offcut 3 in): 4 boards, 5 to buy with 10 % waste.
Same bed, 12 in tall. 12 / 5.5 = 2.18, rounded up to 3 courses, so the walls end up 16.5 in tall and the cut list grows to 6 long and 6 short pieces.
How to read the result
The first line gives the number of courses and the real height of the wall, which may be higher than the height you typed. The cut list gives the quantity and length of each piece; the cut plan lists, board by board, which pieces come out of it and the offcut left over. “Stock boards to buy” is the cut-plan count plus your waste allowance, rounded up.
Inside, the bed measures (L - 2t) x (W - 2t): 93 x 45 in in the example. Use those inside dimensions in the raised bed soil calculator. For the joints themselves, compare the options in raised bed corner joints, and choose fasteners that suit your wood with screws for raised beds. The step-by-step 4 x 8 build shows the assembly order.
Limits
The calculator assumes a rectangular bed with butt-jointed corners where the long sides run the full length. It does not plan mitred or half-lap corners, does not add mid-span braces, and ignores saw kerf and the length lost when you square up a board end. Oregon State University Extension advises reinforcing beds longer than about 6 ft or taller than about 18 inches; the calculator does not add that reinforcement for you, so plan stakes or mid-span posts separately for long or tall beds. Corner post length is flush with the top board; add any length you plan to sink into the ground yourself. Posts are cut from separate stock, such as a 4x4 (3-1/2 x 3-1/2 in actual), and are not included in the board count.
Open source code
The calculator is open source under the MIT licence. Its complete JavaScript, including the first-fit decreasing packing function, is published on this page below the article, so you can check each step above against the code, reuse it or adapt it, keeping the licence notice.
Method and limits
Board dimensions, the definition of dry lumber and retail lengths come from chapter 6 of the USDA Wood Handbook (FPL-GTR-282, 2021), which reproduces the American Softwood Lumber Standard sizes; the width-reduction rule is confirmed by the Southern Pine Inspection Bureau. The reinforcement thresholds come from Oregon State University Extension; unit conversions from NIST. The waste allowance and the decision to ignore kerf are editorial choices, stated as such.
Calculator source code (MIT)
// The Board Garden - raised bed lumber and cut list calculator. MIT licence.
// https://theboardgarden.com/tools/raised-bed-lumber-calculator/
(function () {
var root = document.querySelector('[data-tool="lumber"]');
if (!root) return;
var fr = root.dataset.lang === 'fr';
var f = root.querySelector('form');
var out = root.querySelector('output');
function num(name) {
var v = parseFloat(String(f.elements[name].value).replace(',', '.'));
return isFinite(v) && v > 0 ? v : 0;
}
function fmt(x, d) {
return x.toLocaleString(fr ? 'fr-FR' : 'en-US', { maximumFractionDigits: d === undefined ? 1 : d });
}
function defaults() {
var metric = f.elements.units.value === 'metric';
f.querySelectorAll('[data-di]').forEach(function (el) { el.value = metric ? el.dataset.dm : el.dataset.di; });
root.querySelectorAll('[data-u]').forEach(function (el) { el.textContent = metric ? el.dataset.m : el.dataset.i; });
}
// First-fit decreasing: pack cut pieces into stock boards of one length.
function pack(pieces, stock) {
var boards = [];
pieces.slice().sort(function (a, b) { return b - a; }).forEach(function (p) {
for (var i = 0; i < boards.length; i++) {
if (boards[i].left >= p) { boards[i].cuts.push(p); boards[i].left -= p; return; }
}
boards.push({ cuts: [p], left: stock - p });
});
return boards;
}
function update() {
var metric = f.elements.units.value === 'metric';
root.querySelectorAll('[data-u]').forEach(function (el) { el.textContent = metric ? el.dataset.m : el.dataset.i; });
var u = metric ? 'cm' : 'in';
// All internal lengths in the display unit (inches or cm).
var L = num('len'), W = num('wid'), H = num('hei');
var bw = num('bw'), th = num('th'), stock = num('stock');
if (!metric) { L *= 12; W *= 12; stock *= 12; } // feet -> inches
else { L *= 100; W *= 100; stock *= 100; bw /= 10; th /= 10; } // m -> cm, mm -> cm
var posts = f.elements.posts.checked;
var waste = num('waste') / 100;
if (!(L && W && H && bw && stock)) { out.textContent = fr ? 'Saisissez les dimensions.' : 'Enter the dimensions.'; return; }
var courses = Math.ceil(H / bw);
var shortLen = W - 2 * th; // short sides fit between the long boards (butt joint)
var pieces = [];
for (var c = 0; c < courses; c++) pieces.push(L, L, shortLen, shortLen);
var tooLong = pieces.filter(function (p) { return p > stock; });
if (tooLong.length) {
out.innerHTML = '<p>' + (fr ? 'Une pièce de ' : 'A piece of ') + fmt(tooLong[0]) + ' ' + u +
(fr ? ' dépasse la longueur des planches du commerce choisie : prenez des planches plus longues ou ajoutez un raccord (poteau intermédiaire).'
: ' is longer than the stock board: choose longer stock or add a splice post.') + '</p>';
return;
}
var boards = pack(pieces, stock);
var withWaste = Math.ceil(boards.length * (1 + waste));
var postLen = courses * bw;
var offcut = boards.reduce(function (s, b) { return s + b.left; }, 0);
var rows = [
[fr ? 'Grands côtés' : 'Long sides', 2 * courses, fmt(L)],
[fr ? 'Petits côtés' : 'Short sides', 2 * courses, fmt(shortLen)],
];
if (posts) rows.push([fr ? 'Poteaux d’angle' : 'Corner posts', 4, fmt(postLen)]);
out.innerHTML =
'<p><strong>' + courses + (fr ? ' rang(s) de planches' : ' course(s) of boards') + '</strong> ' +
(fr ? '(hauteur réelle ' : '(actual height ') + fmt(courses * bw) + ' ' + u + ')</p>' +
'<table><thead><tr><th>' + (fr ? 'Pièce' : 'Piece') + '</th><th>' + (fr ? 'Qté' : 'Qty') + '</th><th>' + (fr ? 'Longueur' : 'Length') + ' (' + u + ')</th></tr></thead><tbody>' +
rows.map(function (r) { return '<tr><td>' + r[0] + '</td><td>' + r[1] + '</td><td>' + r[2] + '</td></tr>'; }).join('') +
'</tbody></table>' +
'<p><strong>' + (fr ? 'Planches à acheter : ' : 'Stock boards to buy: ') + withWaste + '</strong> ' +
(fr ? '(' + boards.length + ' au plan de débit + marge de ' : '(' + boards.length + ' by the cut plan + ') + fmt(waste * 100, 0) + (fr ? ' %)' : ' % waste allowance)') +
(posts ? (fr ? '. Poteaux : 4 pièces de ' : '. Posts: 4 pieces of ') + fmt(postLen) + ' ' + u + (fr ? ', à débiter dans un poteau ou un tasseau séparé.' : ', cut from separate post stock.') : '') + '</p>' +
'<p>' + (fr ? 'Plan de débit (chutes : ' : 'Cut plan (offcuts: ') + fmt(offcut) + ' ' + u + ')</p><ol>' +
boards.map(function (b) { return '<li>' + b.cuts.map(function (c) { return fmt(c); }).join(' + ') + ' (' + (fr ? 'chute ' : 'offcut ') + fmt(b.left) + ')</li>'; }).join('') +
'</ol>';
}
f.elements.units.addEventListener('change', function () { defaults(); update(); });
defaults();
f.addEventListener('input', update);
f.addEventListener('submit', function (e) { e.preventDefault(); update(); });
update();
})();
Frequently asked questions
How many 2x6 boards do I need for a 4x8 raised bed?
For a bed 11 inches tall (two courses of 2x6), you need four 8 ft pieces and four 45-inch pieces. Cut from 8 ft boards, that is 6 boards: four full-length and two that each yield two short sides. With 12 ft boards it is 4 boards, each giving one long and one short side. Add your waste allowance on top.
What are the actual dimensions of a 2x6?
A dry, surfaced 2x6 is 1-1/2 by 5-1/2 inches (38 x 140 mm), according to the American Standard lumber sizes table reproduced in the USDA Wood Handbook (chapter 6). A 2x8 is 7-1/4 in wide, a 2x10 is 9-1/4 in and a 2x12 is 11-1/4 in. Measure your boards anyway: the table gives minimum dressed sizes.
Why does the calculator give a taller bed than I asked for?
Boards come in fixed widths, so the calculator rounds the number of courses up. With 2x6 lumber, 12 inches is more than two courses (11 in), so it uses three courses and reports the actual height, 16.5 inches. If 11 inches is acceptable, enter 11 and you save one course.
Does the calculator account for the saw blade?
No. The cut plan ignores the kerf, the width of material the blade removes. When two pieces fill a board almost exactly (for example 45 + 45 inches from a 96-inch board, leaving 6 inches), that is fine; when the offcut shown is smaller than a few blade widths, plan for a slightly shorter piece or a longer board.
Sources
- USDA Forest Service, Forest Products Laboratory (2021). Wood Handbook: Wood as an Engineering Material (FPL-GTR-282), chapter 6: Commercial lumber, round timbers, and ties
- Southern Pine Inspection Bureau. Nominal vs. actual lumber sizes
- Oregon State University Extension Service (2020). Raised bed gardening (FS 270)
- National Institute of Standards and Technology (2008). NIST Guide to the SI, Appendix B.9: Factors for units listed by kind of quantity or field of science (SP 811)