# Plant Spacing Calculator

> Computes how many plants fit in a rectangular bed from its length and width, the in-row spacing, the row spacing and the layout pattern (square grid or staggered triangular rows at 0.866 × row spacing), plus rows, plants per row and plants per square metre.

- Calculator id: `plant-spacing` · Category: Everyday Life (`everyday`) · Tool name: `calculate_plant_spacing`
- Canonical page: https://tttkmbb.com/everyday/plant-spacing · This document: https://tttkmbb.com/everyday/plant-spacing.md · JSON definition: https://tttkmbb.com/everyday/plant-spacing.json

## Purpose

Computes how many plants fit in a rectangular bed from its length and width, the in-row spacing, the row spacing and the layout pattern (square grid or staggered triangular rows at 0.866 × row spacing), plus rows, plants per row and plants per square metre.

**Use when:** You are planting a bed, border, hedge, vegetable plot or ground cover at a given spacing and need the plant count or the density per square metre.

**Do not use when:** You are seeding a lawn by weight (use lawn-seed-fertilizer) or planting an irregular, non-rectangular area (split it into rectangles first).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `bed_length_m` | number | m | required | Length of the bed (rows run along this side). (> 0, max 10000) |
| `bed_width_m` | number | m | required | Width of the bed (rows are spaced across this side). (> 0, max 10000) |
| `plant_spacing_m` | number | m | required | Distance between plants within a row. (> 0, max 100) |
| `row_spacing_m` | number | m | optional | Distance between rows; defaults to plant_spacing_m. In the triangular pattern the rows are 0.866 × this value apart. (> 0, max 100) |
| `pattern` | enum: square \| triangular |  | optional, default "square" | Square grid or staggered rows in which each plant sits between the two plants of the neighbouring row. |
| `edge_offset` | boolean |  | optional, default true | true: the first plant sits half a spacing in from each edge (count = floor(length / spacing)); false: plants start on the edge (count = floor(length / spacing) + 1). |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `plants_total` | integer |  | Total number of plants that fit. |
| `plants_per_row` | integer |  | Plants in a full row (first, third, fifth … row in the triangular pattern). |
| `plants_per_alternate_row` | integer |  | Plants in the offset rows of the triangular pattern (equal to plants_per_row for the square grid). |
| `rows` | integer |  | Number of rows across the bed width. |
| `row_spacing_m` | number | m | Distance between rows (row spacing × 0.866 for triangular). |
| `plants_per_m2` | number | plants/m² | plants_total / bed area. |
| `plants_per_m2_theoretical` | number | plants/m² | 1 / (plant spacing × row spacing used), the density of an unbounded planting. |
| `spacing_cm` | number | cm | In-row spacing in centimetres. |
| `coverage_note` | string |  | Layout summary and comparison with the other pattern. |

## Formula

`square: plants_per_row = floor(L / s) (+1 without edge offset), rows = floor(W / r) (+1), plants = plants_per_row × rows; triangular: h = 0.866 × r, rows = floor(W / h) (+1), full rows floor(L / s) (+1) plants, offset rows floor(L / s − 0.5) (+1) plants, rows alternate starting with a full row; plants_per_m2 = plants / (L × W); density = 1 / (s × h)`

Plants are placed on a grid whose first plant is half a spacing from the edge (or on the edge when edge_offset is false); the triangular pattern shifts every second row by half a spacing and brings rows to √3/2 = 0.866 of the spacing, giving 15.5 % more plants per area for the same distance between neighbours. Spacings should be the mature-spread distances given for the plant.

## Data Sources

- Circle packing – square versus hexagonal (triangular) arrangements (Wikipedia) — https://en.wikipedia.org/wiki/Circle_packing (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/plant-spacing?bed_length_m=…&bed_width_m=…&plant_spacing_m=…`
- `POST https://tttkmbb.com/api/v1/calculate/plant-spacing` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/plant-spacing · OpenAPI operationId `calculate_plant_spacing` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "plant-spacing", "inputs": {…}}`

## Example

- 10 × 2 m bed, 0.3 m square grid: inputs `{"bed_length_m":10,"bed_width_m":2,"plant_spacing_m":0.3,"pattern":"square"}` → `{"plants_total":198,"plants_per_row":33,"rows":6,"row_spacing_m":0.3,"plants_per_m2":9.9,"spacing_cm":30}`
- 10 × 2 m bed, 0.3 m triangular: inputs `{"bed_length_m":10,"bed_width_m":2,"plant_spacing_m":0.3,"pattern":"triangular"}` → `{"plants_total":228,"plants_per_row":33,"plants_per_alternate_row":32,"rows":7,"row_spacing_m":0.26,"plants_per_m2":11.4}`

```
GET https://tttkmbb.com/api/v1/calculate/plant-spacing?bed_length_m=10&bed_width_m=2&plant_spacing_m=0.3&pattern=square
```

## Limitations

You are seeding a lawn by weight (use lawn-seed-fertilizer) or planting an irregular, non-rectangular area (split it into rectangles first). Plants are placed on a grid whose first plant is half a spacing from the edge (or on the edge when edge_offset is false); the triangular pattern shifts every second row by half a spacing and brings rows to √3/2 = 0.866 of the spacing, giving 15.5 % more plants per area for the same distance between neighbours. Spacings should be the mature-spread distances given for the plant. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**Which spacing should I enter?**

The distance between plant centres recommended for the mature plant (label or nursery data), which is usually its mature spread; using a smaller spacing gives quicker cover at higher cost.

**Why does the triangular pattern fit more plants?**

Staggering the rows lets them sit 0.866 × the spacing apart while every plant keeps the same distance to its six neighbours, the hexagonal (densest) packing of circles.

**Does the count change if I start plants on the edge?**

Yes: with edge_offset false one more plant fits per row and one more row fits, but plants on the edge overhang the bed once mature.

## Related

- [Lawn Seed and Fertilizer Calculator](https://tttkmbb.com/everyday/lawn-seed-fertilizer.md) — Seed and fertilizer for lawn areas.
- [Area Converter](https://tttkmbb.com/conversion/area.md) — Convert the bed area between units.
- [Rectangle Calculator](https://tttkmbb.com/geometry/rectangle.md) — Area and perimeter of the bed.
