Cartons per pallet layer calculator
Turn a carton footprint into a layer count before you build the stack: 400 × 300 cartons on a 1200 × 800 pallet fit 6 aligned but 8 when rotated, covering 100% of the deck. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Carton length
- 400
- Carton width
- 300
- Pallet length
- 1,200
- Pallet width
- 800
- Aligned count
- 6
- Aligned columns
- 3
- Aligned rows
- 2
- Rotated count
- 8
Warehouse planners, fulfillment engineers, and 3PL quote desks need a single integer before they stack a pallet: how many identical cartons sit in one layer on the usable deck. This cartons per pallet layer calculator takes carton length, carton width, pallet length, and pallet width in any consistent unit and returns that count using two axis-aligned grids plus a two-block mixed-orientation fill when rotation is allowed. The aligned pattern places carton length along pallet length; the rotated pattern turns every carton ninety degrees; the mixed pattern fills a primary strip in one orientation and packs the leftover strip in the other so leftover deck is not wasted. Results include both simple grids, leftover length and width, used and unused area, utilization percent, and the area bound so you can see how close the layer is to a perfect fill. Zero or negative sides fail as invalid input; a carton that cannot sit on the deck returns zero cartons rather than inventing a squeeze.
Where a cartons per pallet layer calculator earns its keep
Ecommerce warehouses use a cartons per pallet layer calculator so slotting and outbound planning can turn a SKU case footprint into a layer quantity before anyone builds a stack. Third-party logistics operators and freight brokers need a deterministic oracle for rate quotes, load plans, and margin checks when the same carton appears on euro, GMA, and half pallets. Packing stations can measure a case once and decide whether to rotate every unit, accept a mixed layer, or switch carton size instead of discovering wasted deck on the dock.
Failed validation does not consume balance.
What you can do with it
Warehouse slotting and outbound layer plans
Turn each SKU case footprint into a cartons-per-layer integer so pick faces, stack heights, and load sheets start from the same deck count.
3PL quotes across euro and GMA decks
Compare how many cases sit on 1200×800 versus 48×40 pallets, with and without rotation, before you commit a rate or a trailer plan.
Pack-station carton and orientation choice
Measure a packed case and decide whether to rotate every unit, accept a mixed layer, or change the carton so leftover deck is not wasted.
FAQ
Which units should I use for carton and pallet sides?
Any consistent length unit: millimetres, centimetres, or inches. Do not mix systems in one request.
Does the calculator try turning the cartons?
Yes, unless you switch rotation off. It compares the aligned grid, a grid with every carton turned ninety degrees and a mixed layer that fills the leftover strip the other way, then keeps the pattern with the most cartons.
Can I keep every carton facing the same way?
Yes. Turn off the rotation option when labels or clamp patterns forbid turning a case. The count then uses only the aligned grid: for 400 × 300 cartons on a 1200 × 800 deck that means 6 instead of 8.
What does the utilization percentage show?
It shows how much of the pallet deck the cartons cover. Eight 400 × 300 cartons use the whole 1200 × 800 deck, so utilization is 100% with no unused area. A lower figure means deck space is left over.
What happens if the carton is bigger than the pallet?
You get zero cartons per layer, not an error and not an invented squeeze. The result simply says that no pattern fits, so you know at once that this carton cannot sit on that deck in any orientation.
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/ecom/cartons-per-layer \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"carton_length":400,"carton_width":300,"pallet_length":1200,"pallet_width":800}'const res = await fetch("https://api.kit.forhosting.com/ecom/cartons-per-layer", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"carton_length": 400,
"carton_width": 300,
"pallet_length": 1200,
"pallet_width": 800
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/ecom/cartons-per-layer",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"carton_length": 400,
"carton_width": 300,
"pallet_length": 1200,
"pallet_width": 800
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/ecom/cartons-per-layer", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"carton_length":400,"carton_width":300,"pallet_length":1200,"pallet_width":800}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"carton_length":400,"carton_width":300,"pallet_length":1200,"pallet_width":800}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/ecom/cartons-per-layer", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"carton_length": 400,
"carton_width": 300,
"pallet_length": 1200,
"pallet_width": 800
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "ecom.cartons_per_layer",
"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 a pallet layer count is and how the three patterns work
A pallet layer is a single storey of identical cartons standing on the deck, so the only dimensions that matter are the two footprint sides of the carton and the two usable sides of the pallet. This calculator first builds the aligned grid: the number of cartons along pallet length is the integer floor of pallet length divided by carton length, and the number along pallet width is the floor of pallet width divided by carton width. Units cancel as long as every side uses the same unit, millimetres, centimetres, or inches alike. Their product is aligned_count. When allow_rotation is true (the default), it builds the rotated grid the same way after swapping the carton sides, giving rotated_count. Those two regular patterns are what most warehouse sketches show, but they can leave a leftover strip wide enough for more cartons turned the other way. The mixed two-block fill walks every legal strip width along each pallet axis, packs the strip in one orientation, and packs the remaining rectangle in the other. cartons_per_layer is the maximum of the allowed patterns. layout names the winner: aligned, rotated, mixed, or none when the carton does not fit. leftover_length and leftover_width report unused deck after the best single-orientation grid so you can see the strip that mixed may have harvested. used_area is cartons_per_layer times carton area; utilization_percent is used_area over pallet area times one hundred; area_bound is the floor of pallet area over carton area and is the absolute maximum any packing of identical rectangles can reach.
Input contract, response shape, and validation behaviour
Sides larger than one million or a layer that would place more than ten thousand cartons along one edge are rejected so a unit mix-up cannot explode the two-block search. POST a JSON body with four required positive finite numbers: carton_length and carton_width for the carton footprint, and pallet_length and pallet_width for the usable pallet deck. Optional allow_rotation is a boolean that defaults to true; set it to false when labels, barcodes, or clamp patterns forbid turning the carton. Each numeric field may arrive as a JSON number or as a numeric string; aliases include box_length, box_width, deck_length, deck_width, cl, cw, pl, pw, rotate, and rotation. Missing required fields, empty strings, non-finite values, zero, and negative sides fail with invalid_input naming the field and are not billed. On success the body echoes the four sides and allow_rotation, then aligned_count with aligned_columns and aligned_rows. When rotation is allowed it also returns rotated_count with its columns and rows, and mixed_count from the two-block fill. cartons_per_layer is the integer you use for planning; layout is aligned, rotated, mixed, or none. leftover_length and leftover_width describe unused deck after the best regular grid. carton_area, pallet_area, used_area, unused_area, utilization_percent, and area_bound complete the audit. Example: carton four hundred by three hundred on a twelve-hundred by eight-hundred euro deck yields aligned_count six, rotated_count eight, mixed_count eight, layout rotated, leftover zero, and one hundred percent utilization. Pair this with a height stack step if you still need layers per pallet; this endpoint solves one layer only.
Where a cartons per pallet layer calculator earns its keep
Spreadsheet replacements and low-code automations call the API so finance can rebuild historical pallet counts when auditing a chargeback that claimed fewer cases per layer than the footprint allows. Keep the four sides in one unit system, pin cartons_per_layer and utilization_percent in tests, and you get reproducible layer counts for WMS plugins, TMS load builders, and edge workers without standing up a full palletization solver of your own.
Technical questions
How do I calculate how many cartons fit in one pallet layer?
Send carton_length, carton_width, pallet_length, and pallet_width in one unit. The API returns aligned, rotated, and mixed counts and sets cartons_per_layer to the best allowed pattern.
Does the calculator rotate cartons on the deck?
Yes by default. allow_rotation true (the default) tries a 90-degree turn of every carton and a two-block mixed fill. Set allow_rotation to false when labels or clamps must stay facing one way.
What if the carton is larger than the pallet?
The task succeeds with cartons_per_layer 0 and layout none. That is the planning answer: the footprint does not sit on the deck. Zero or negative sides are rejected as invalid_input.
What does the cartons per pallet layer calculator cost?
The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.