A plant spacing calculator that tells you exactly how many plants fit into any rectangular bed — and whether a square or triangular (offset-row) layout makes better use of your space. It handles any unit (cm, in, ft, m), converts on the fly, and draws a dot-grid diagram so you can visualise the layout before you pick up a trowel.
How it works
The two supported patterns use different formulas.
Square grid
Every plant sits at the corner of a grid of equal squares. The number of plants is simply:
Plants = floor(L ÷ s) × floor(W ÷ s)
where L is the bed length, W is the bed width and s is the centre-to-centre spacing. Each plant “owns” a square cell of side s, so the area per plant is s².
Triangular (offset-row) grid
Alternate rows are shifted by half a spacing (s ÷ 2). The vertical distance between rows shrinks to:
row pitch = s × √3 ÷ 2 ≈ 0.866 × s
Each plant now sits at the centre of a regular hexagon, the tightest possible packing on a flat surface. The number of rows is:
rows = floor((W − s) ÷ row pitch) + 1
Odd-numbered rows start at x = 0 and hold floor(L ÷ s) + 1 plants (capped at the bed edge); even rows are offset by s ÷ 2 and may hold one fewer. The calculator counts each row individually for precision.
The density gain over square packing is exactly 2 ÷ √3 − 1 ≈ 15.47 % for a large infinite bed; real-world gains for finite beds are shown in the results panel.
Worked example
A raised bed 240 cm × 120 cm planted with lettuce at 25 cm spacing:
| Pattern | Plants | Density |
|---|---|---|
| Square grid | 9 × 4 = 36 | 12.5 /m² |
| Triangular | 43 | 14.9 /m² |
The triangular layout adds 7 extra lettuces in the same space — a useful gain when growing in limited raised-bed area.
A 4 ft × 8 ft bed with basil at 8 in spacing (square-foot gardening style):
- Square grid: 6 × 12 = 72 plants
- Triangular: 83 plants (+15 %)
Switch the unit selector to “in” or “ft” to enter values directly; the calculator converts to cm internally.
Formula reference
| Symbol | Meaning |
|---|---|
| L | Bed length (same unit as s) |
| W | Bed width |
| s | Centre-to-centre plant spacing |
| floor(x) | Round down to nearest whole number |
| √3 | ≈ 1.732 (exact) |
The coverage percentage shown in the results is the ratio of the total plant cell area to the bed area. For a square grid this is always (floor(L/s) × s × floor(W/s) × s) ÷ (L × W); for a triangular grid each plant cell is an equilateral triangle of side s with area (√3 ÷ 4) × s², and coverage = total plants × cell area ÷ bed area.