Plants calculator
Buy the right number of seedlings: a bed of 12 square metres with plants 0.5 metres apart on a square grid holds 48 plants, 4 per square metre, with no soil left over. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Area
- 12
- Spacing
- 0.5
- Cell area
- 0.25
- Plants
- 48
- Density
- 4
- Used area
- 12
Garden planting density is a biology question before it is a shopping list: given a bed of known area and the on-center spacing a crop needs to mature without crowding, how many individual plants actually fit? This plants calculator treats each plant as occupying a square cell whose side is the required spacing, then floor-divides bed area by that cell so a leftover sliver of soil does not invent an extra seedling. Spacing must be a positive length in the same unit as the square root of area; zero and negative spacing are rejected because a plant cannot claim a non-positive footprint.
What plant count means and how spacing becomes a footprint
Plant count in this tool is the largest whole number of identical plants that fit on a square planting grid inside the bed you describe. Area is the horizontal surface of the bed — length times width for a rectangle, the sum of sections for an L-shaped or island bed — and it must share units with spacing so that square metres pair with metres and square feet pair with feet.
Spacing is the on-center distance required per plant: the pitch between neighbouring stems that horticulture sheets publish for tomatoes, lettuce, ornamentals, or cover crops. That single length becomes a square footprint of spacing times spacing, which is the cell of bed each plant claims when rows and columns use the same pitch. The identity is then plants equals the floor of area divided by that cell, with a tiny floating-point epsilon so exact multiples of the cell do not drop one plant from rounding noise.
A remainder of unused area is reported rather than rounded up, because a partial cell cannot hold a mature plant at the stated spacing.
Where a plant-count calculator earns its keep
Home gardeners meet this problem when a raised bed is measured in metres or feet, a seed packet quotes thirty centimetres or twelve inches on centre, and the cart asks how many seedlings or plugs to buy before the last frost. Horticulture teachers and extension agents use the same identity to generate answer keys for modest bed sizes without trusting opaque mobile apps that switch units mid-form or confuse linear spacing with plants per square metre.
Greenhouse and nursery schedulers feed measured bench area and crop-specific spacing to produce reproducible plant totals for orders, transplant waves, and bench maps. Developers call the same contract from scripts to seed deterministic test vectors for garden planners, to normalise user-entered bed sizes before a storefront suggests pack sizes, or to satisfy programming-challenge statements that demand an integer plant count rather than a hand-waved “about twenty plants.”
Product tools use the square-grid floor when a homeowner types twelve square metres and half a metre of spacing and the UI must show plants before checkout. Subtract paths and aisles from area before you call; keep this landing when the search is how many plants fit.
What you can do with it
Raised-bed seedling orders
Measure bed area, read the on-center spacing from the seed packet or crop sheet, and order the exact integer plant count the formula returns.
Greenhouse bench maps
Feed measured bench area and crop-specific spacing to produce reproducible plant totals for transplant waves and nursery orders.
Classroom planting-density keys
Generate deterministic answer keys for how many plants fit in a bed at a stated spacing without opaque apps or unit-switching forms.
FAQ
How do I calculate how many plants fit in a garden bed?
Send a positive bed area and a positive per-plant spacing in matching units.
What happens if spacing is zero or negative?
A plant cannot claim a non-positive footprint, so zero or negative spacing is rejected and is not billed.
Does the calculator use triangular or hexagonal packing?
No. It models a square grid only: each plant occupies a spacing-by-spacing cell. Subtract paths from area before calling if you need to reserve aisles.
What units should I use for area and spacing?
Any consistent pair: square metres with metres, square feet with feet. The tool does not convert units; mismatched units produce a meaningless count.
What happens to leftover soil too small for another plant?
It is reported as unused area instead of being rounded up into an extra plant. A partial cell cannot hold a mature plant at the stated spacing, so the count stays at the whole plants that truly fit.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/bio/plants \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"area":12,"spacing":0.5}'const res = await fetch("https://api.kit.forhosting.com/bio/plants", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"area": 12,
"spacing": 0.5
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/bio/plants",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"area": 12,
"spacing": 0.5
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/bio/plants", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"area":12,"spacing":0.5}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"area":12,"spacing":0.5}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/bio/plants", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"area": 12,
"spacing": 0.5
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "bio.plants",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
What plant count means and how spacing becomes a footprint
The response echoes area and spacing, reports cell_area as the footprint, plants as the integer count, density as plants per unit area, used_area and unused_area as the split of the bed, a formula string, a short message, and the arithmetic steps. There is no crop catalogue, no hexagonal packing option, and no unit converter: the page answers only how many plants the area-and-spacing model implies, with stable numbers suitable for worksheets, greenhouse schedules, and API consumers that must match goldens run after run.
Input contract, validation, and reproducible results
Every numeric field must be finite. Preferred fields are area for garden-bed surface and spacing for the length required per plant. Aliases such as bed_area, bed, surface, surface_area, garden_area, and A for area, and plant_spacing, space, gap, S, interval, and on_center for spacing are accepted so spreadsheets, query strings, and typed forms can reuse the same contract without renaming columns. A missing, zero, or negative area is rejected with invalid_input because a blank form cannot claim a planting density. Spacing must likewise be a finite positive number: zero or negative spacing is rejected with a clear invalid_input message, matching the published contract that a plant cannot occupy a non-positive cell. Pair the free browser run on this page with the priced API when you need the identical mathematical result inside an automated pipeline without re-implementing the plant-count formula yourself. Failed validation is not billed; only a successful item consumes the published $0.002 base price.
Where a plant-count calculator earns its keep
On this page the work runs entirely in your browser; through the API each successful lookup costs $0.002, failed validation is not charged, and nothing is stored after the response returns. That split — free interactive exploration and a priced, identical API — matches the rest of the KIT tier-A catalog and lets you move from a backyard demo to an automated planting pipeline without changing the mathematical result.
Technical questions
What does the plants calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.