ForHosting KIT · Developer Utilities

Garden bed plant spacing calculator

This garden bed plant spacing calculator turns three practical measurements into a clear planting plan.

● BetaFree · in your browser
Use it from WebAPIEmailTelegramApp soon

Enter the usable length and width of a rectangular bed, then enter the recommended centre-to-centre spacing for one plant. The result shows the number of complete rows, the number of columns, the total plants that fit, and the unused space along each direction. All measurements may use inches, centimetres, feet, or another linear unit, provided that the same unit is used for every input.

Measure the usable bed before planning the grid

Start with the inside dimensions that can actually hold plants, not the outside dimensions of timber, blocks, edging, or a raised-bed frame. Measure the bed length and width along the soil surface. If a path, irrigation box, permanent support, large rock, or other obstruction occupies part of the rectangle, reduce the measurement or divide the space into separate rectangles and calculate each one independently. Enter both dimensions in one consistent unit. Inches and centimetres are convenient for close spacing, while feet or metres can work for larger crops if the spacing is expressed in that same unit. This calculator treats the bed as a complete rectangle and places equal square grid cells across it. It counts only full spacing cells, so a partial strip at an edge is reported as unused space instead of being treated as room for another plant. That conservative rule helps keep the requested centre-to-centre distance intact throughout the layout.

Choose spacing that matches the mature plant

Use the spacing recommended for the specific crop, variety, and growing method rather than the size of a seedling at planting time. Recommended spacing normally describes the distance from the centre of one plant to the centre of the next. Seed packets, nursery labels, and trusted local growing guides are useful sources, but their advice may differ because climate, soil fertility, pruning, and harvest stage affect mature size. Enter one spacing value for both directions because this capability calculates a regular square grid. It does not model staggered, triangular, hexagonal, intercropped, or row-and-aisle arrangements. The spacing must fit within the bed's smaller dimension; otherwise even one full grid cell cannot be formed, and the calculation returns an input error. If you intentionally want one specimen in a narrow bed, use a layout method based on edge clearance and plant radius rather than claiming that the recommended grid spacing fits.

Read the result and mark the planting positions

The result divides the bed length by plant spacing and rounds down to obtain complete rows. It repeats that operation across the width to obtain columns, then multiplies rows by columns for the total plant count. For example, a 240 by 120 centimetre bed with 30 centimetre spacing provides eight rows and four columns, or thirty-two plants. Any remainder appears as unused length or unused width. You can leave that remainder at one edge, or split it equally between opposite edges to centre the grid and create a more balanced border. To transfer the plan outdoors, mark parallel lines at the chosen spacing, beginning after your selected edge offset, and place a plant where the row and column lines intersect. Remember that the arithmetic checks geometric capacity only. Access, sunlight, crop rotation, root competition, irrigation coverage, companion planting, and local horticultural advice can all justify using fewer plants than the maximum grid count.

Plan seedlings for a raised bed

Estimate how many seedlings to buy or start after choosing a crop's recommended spacing and measuring the usable soil area.

Compare crop spacing options

Run the same bed dimensions with different recommended spacings to compare realistic grid capacities for several crops or varieties.

Mark an even planting grid

Use the returned row and column counts plus unused edge space to centre and mark a repeatable square planting layout.

What does the calculation cost?

An API request costs $0.002. The calculation is also suitable for the free browser runner generated for this tier-A capability.

Which measurement unit should I use?

Use any linear unit, such as inches or centimetres, but use exactly the same unit for bed_length, bed_width, and plant_spacing.

How is the number of plants calculated?

Rows are floor(bed_length divided by plant_spacing), columns are floor(bed_width divided by plant_spacing), and plant_count is rows multiplied by columns.

Why does spacing larger than the bed return an error?

If spacing exceeds the bed's smallest dimension, the rectangular bed cannot contain even one complete spacing cell in both directions.

Does this calculate staggered or triangular planting?

No. It calculates a regular square grid with the same centre-to-centre spacing along the bed length and width.

What should I do with unused edge space?

Leave it at one edge or divide it equally between opposite edges to centre the planting grid while preserving the recommended spacing.

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.

POSThttps://api.kit.forhosting.com/home/garden-bed-layout-spacing

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.

curl -X POST https://api.kit.forhosting.com/home/garden-bed-layout-spacing \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"bed_length":240,"bed_width":120,"plant_spacing":30}'
{
  "bed_length": 240,
  "bed_width": 120,
  "plant_spacing": 30
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "home.garden_bed_layout_spacing",
  "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.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →