Boxes per pallet calculator
The boxes per pallet calculator provides a quick, repeatable capacity estimate for identical rectangular cartons.
Run — free
Supply the external length, width, and height of one box, the usable length and width of the pallet, and the maximum vertical space available for the cartons. It checks both straight footprint orientations, chooses the layout with the greater number of complete boxes per layer, and calculates the number of full layers. The result also exposes row counts, used height, unused height, and both orientation totals so the estimate can be reviewed instead of accepted as a black box.
Enter dimensions that describe the usable load
Measure the closed box at its greatest external length, width, and height. Packaging drawings may show internal dimensions, but internal measurements do not represent the space a finished carton occupies. Likewise, use the pallet area that boxes may actually cover rather than relying only on a nominal pallet name. If company rules prohibit overhang, the usable pallet footprint ends at the permitted boundary. Corner posts, collars, wrap clearance, labels, or handling equipment may reduce that area further. All six values must use one consistent linear unit. Millimetres, centimetres, inches, and feet each work, but they cannot be mixed within one request because the calculator compares their ratios directly. Maximum stack height means the vertical allowance for boxes, excluding the pallet itself. When a carrier specifies a total loaded height, subtract the pallet height before entering the limit. Every dimension must be a finite number greater than zero. Careful measurements make the result useful as a planning baseline and prevent small packaging differences from becoming large errors over many layers.
Read the footprint and layer calculation
The calculator tests two axis-aligned rectangular grids. In the standard grid, box length runs along pallet length and box width runs along pallet width. In the rotated grid, the box footprint turns ninety degrees. For each grid, the tool divides the corresponding pallet edge by the box edge and rounds down, because only complete boxes count. Multiplying the two edge counts gives boxes per layer. The grid with the larger total is selected; if both totals tie, the standard orientation wins so repeated requests remain predictable. The vertical calculation divides maximum stack height by box height and also rounds down to complete layers. Boxes per layer multiplied by layers produces the total box count. Returned fields show the chosen orientation, boxes along each pallet edge, used height, leftover height, and the layer totals for both orientations. The method never allows overhang and never counts a partial layer. If the footprint fits in neither orientation, the request returns an input error. If the footprint fits but one full box exceeds the height allowance, the valid result contains zero layers and zero total boxes.
Validate the estimate before operational use
Use the calculated quantity for early packaging comparisons, product master data, warehouse estimates, freight quotes, and consistent scenario analysis. It is a geometric capacity, not a complete pallet-engineering approval. The algorithm assumes identical rigid rectangular boxes, one orientation throughout each layer, a flat usable pallet, and no required spacing. It does not build mixed-orientation rows, pinwheel patterns, interlocked layers, or layouts with controlled overhang. A specialized palletization study may find a denser safe pattern, particularly when leftover strips can accept rotated cartons. Physical and regulatory limits can also reduce the practical quantity. Check the maximum permitted load weight, carton compression strength, product fragility, centre of gravity, pallet rating, rack clearance, vehicle clearance, fire rules, and customer requirements. Slip sheets, dividers, corner protection, caps, and stretch wrapping consume space or alter stability. Test the proposed stack when failure would damage goods or create a handling hazard. The API calculation costs $0.002 per request and is deterministic, so the same measurements always produce the same result. That makes it suitable for automation while keeping final safety decisions with packaging and logistics professionals.
What you can do with it
Compare carton designs
Evaluate how proposed box footprints and heights change pallet capacity before committing to packaging.
Populate product records
Create a consistent geometric boxes-per-pallet estimate for catalogue and fulfillment data.
Plan outbound loads
Estimate complete layers and total cartons for quoting, staging, and transport scenarios.
FAQ
Can I use inches instead of centimetres?
Yes. Use any linear unit, but use that same unit for every box, pallet, and height value.
Does maximum stack height include the pallet?
No. Enter only the height available for boxes. Subtract pallet height from a total loaded-height limit first.
Does the calculator rotate the boxes?
Yes. It compares a standard rectangular grid with the box footprint rotated ninety degrees.
Does it calculate mixed or pinwheel layouts?
No. It uses one straight orientation per layer and does not mix orientations within a layer.
Does the result account for weight and stacking strength?
No. Confirm load weight, compression strength, stability, clearances, and applicable handling rules separately.
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/ecom/boxes-per-pallet \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"box_length":40,"box_width":30,"box_height":25,"pallet_length":120,"pallet_width":100,"max_stack_height":150}'const res = await fetch("https://api.kit.forhosting.com/ecom/boxes-per-pallet", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"box_length": 40,
"box_width": 30,
"box_height": 25,
"pallet_length": 120,
"pallet_width": 100,
"max_stack_height": 150
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/ecom/boxes-per-pallet",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"box_length": 40,
"box_width": 30,
"box_height": 25,
"pallet_length": 120,
"pallet_width": 100,
"max_stack_height": 150
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/ecom/boxes-per-pallet", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"box_length":40,"box_width":30,"box_height":25,"pallet_length":120,"pallet_width":100,"max_stack_height":150}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"box_length":40,"box_width":30,"box_height":25,"pallet_length":120,"pallet_width":100,"max_stack_height":150}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/ecom/boxes-per-pallet", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"box_length": 40,
"box_width": 30,
"box_height": 25,
"pallet_length": 120,
"pallet_width": 100,
"max_stack_height": 150
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "ecom.boxes_per_pallet",
"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. |