Skip to main content

How to plan inventory for an ecommerce business

You buy stock on instinct and you alternate between running out and filling the warehouse with what will not sell.

Last updated: Guide

Every inventory decision gets made on its own, and that is where the trouble starts. You buy what ran out, you reorder when someone notices, and the cost of holding too much is never weighed against the cost of running short, because neither of them appears in the accounts under its own name.

This guide chains the six decisions into one system: what demand you expect, how much it swings, how long your supplier takes, how much buffer you need, when to reorder, and what all of that costs you over a year. Each step feeds the next with a number rather than an impression.

You will not find a recommended safety stock percentage here, nor a "typical" annual carrying rate. Those figures circulate widely and do not survive scrutiny: they depend on your margin, your cost of capital, your warehouse and your product. What you will find is how to work out your own.

  1. [The six decisions, in order](#six-decisions)
  2. [Average demand and variability are not the same thing](#demand-variability)
  3. [Cycle service level and fill rate](#csl-fillrate)
  4. [The simple method and the statistical one](#two-methods)
  5. [The formulas](#formulas)
  6. [A full worked example](#worked-example)
  7. [What another point of service level costs](#sensitivity)
  8. [From reorder point to order quantity](#order-quantity)
  9. [The four families of holding cost](#holding-cost)
  10. [Common mistakes](#mistakes)
  11. [Warning signs](#warning-signs)
  12. [When the model stops being reliable](#limits)
  13. [The procedure](#procedure)
  14. [Frequently asked questions](#faq)
  15. [Sources and methodology](#sources)

The six decisions, in order

demand          how many units a day do you expect to sell?
variability     how far does real demand stray from that average?
lead time       how long does the supplier take, and how much does that vary?
safety stock    how much buffer do you buy against that uncertainty?
reorder point   at what stock level do you place the next order?
order quantity  how many units go into each order?

Then two consequences that are not decisions but cost money anyway: the cash locked into stock, and the cost of keeping it there.

The order matters. You cannot set a reorder point without knowing the lead time, or a safety stock without knowing the variability. Almost every inventory problem you see in a shop is really a skipped step.

Average demand and variability are not the same thing

Two products selling eighteen units a day on average can need completely different inventories. If one sells seventeen, eighteen or nineteen every day and the other alternates weeks of five with weeks of forty, the second needs a far bigger buffer even though the average is identical.

What measures that difference is the standard deviation of daily demand: a number saying how far a normal day sits from the average. You compute it from your own sales history, day by day. It is a fact about the business, not a guess.

The same idea applies to the supplier. A ten-day lead time that is sometimes eight and sometimes twelve is not the same as ten days flat. The second source of uncertainty is the lead time, and it has to be measured separately.

When both vary at once, they combine like this:

lead-time sigma = sqrt( lead time × demand deviation²
                      + demand² × lead-time deviation² )

The two terms add because both risks accumulate over the same window: the days it takes you to restock.

Cycle service level and fill rate

Here is a confusion that costs money. There are two ways of measuring "how well you serve" and they do not mean the same thing.

Cycle service level is the probability of not running out during a replenishment cycle. It measures whether a stockout happens, not how much demand goes unserved. A cycle with a one-unit shortfall and one with a two-hundred-unit shortfall count the same.

Fill rate is the percentage of demand you manage to serve from stock over time. It measures the size of the failure, not whether it occurred.

For the same product, fill rate comes out higher than cycle service level. That is not a paradox: most stockouts are small and happen at the end of the cycle when little stock is left, so they affect a small slice of total demand.

The practical consequence: when someone tells you they run "95% service", ask which one. And when you set yours, the one that goes into the safety stock formula is the cycle service level.

The simple method and the statistical one

The simple method covers the worst case you have seen:

safety stock = (max daily sales × max lead time)
             − (avg daily sales × avg lead time)

It needs no statistics and fits in two spreadsheet columns. Its weakness is that "max" depends on how much history you look at: the more data you have, the more extreme the maximum and the more stock it demands. It is useful when you have little data, or when demand looks nothing like a bell curve.

The statistical method fixes a probability and turns it into a multiplier:

safety stock = z × lead-time sigma

where z comes from the standard normal distribution. For a cumulative probability of 0.900 the critical value is z = 1.282; for 0.950 it is 1.645; for 0.975 it is 1.960 and for 0.990 it is 2.326. Those values are tabulated in the NIST statistics handbook, which is where they are taken from here.

That method assumes demand is roughly normally distributed and independent between days. It has to be said out loud, because it is not always true, and when it is false the answer falls short in exactly the cases that hurt most. We come back to this under limits.

Which to use. If you have at least a few months of daily history and demand is not dominated by isolated spikes, use the statistical one. If you sell sporadically, use the simple one, with your eyes open.

The formulas

demand during lead time = daily demand × lead time in days

lead-time sigma = sqrt( leadTime × demandDev² + demand² × leadTimeDev² )

safety stock = round up ( z × lead-time sigma )

reorder point = demand during lead time + safety stock

inventory position = on hand + on order − allocated

annual holding cost = capital + storage + service + risk

annual carrying rate = annual holding cost / average inventory value

Rounding the safety stock up is not cosmetic: you cannot keep half a unit on a shelf, and rounding down breaks the very probability you just chose.

A full worked example

A hypothetical product with these figures, measured from its own history:

  • it sells 18 units a day on average;
  • the standard deviation of daily demand is 5 units;
  • the supplier takes 10 days on average;
  • that lead time varies by 2 days;
  • each unit costs €7.20 landed in the warehouse.

Step 1: uncertainty accumulated over the lead time. Combining both sources, sigma comes out at 39.32 units.

Step 2: safety stock. At a cycle service level of 95%, the critical value is z = 1.645, and the unrounded buffer is 64.67 units. Rounded up: 65 units. That is 3.61 days of average sales.

Step 3: the reorder point. Over the 10 days of lead time you expect to sell 180 units. Add the buffer and you reorder when inventory falls to 245 units.

With 260 units in stock, is it time to order? no: there are 0.83 days of headroom left.

Step 4: what holding inventory costs. Adding the four families of cost over an average inventory valued at €54,000.00, the annual cost is €11,500.00, or €958.33 a month. Against the value of the inventory, that is an annual rate of 21.3%. Per average unit stored, it is €2.05 a year.

That rate belongs to this business. It is nobody else's, and it is the one to use in the next step.

Step 5: order quantity. The supplier imposes a minimum of 1,500 units, which at €7.20 per unit plus €320.00 of fixed order cost is €11,120.00 of up-front cash. That lot covers 2.78 months of sales and its average inventory is 750 units, so holding it costs €266.20 over the cycle — worked out with the rate from the previous step, not an assumed one.

At €19.90 a unit and €2.40 of variable selling cost, each unit contributes €10.30. The whole lot contributes €15,450.00, and once the holding cost is taken out that leaves €14,863.80.

In cash terms: each unit sold brings back €17.50, so it takes 635 units to recover the outlay, which happens in 1.18 months.

What another point of service level costs

The question to ask is not "what service level do I want?" but "what does the next point cost?". With the same figures as the example:

Service levelzSafety stockCash locked inAnnual holding cost
90.0%1.28251 units€367.20€78.20
95.0%1.64565 units€468.00€99.67
99.0%2.32692 units€662.40€141.07

Look at the shape. Going from 90% to 95% costs a handful of extra units. Going from 95% to 99% costs considerably more. The curve steepens, and near total certainty it explodes: covering the last point of service can cost more than the previous twenty together.

That is why there is no service level that is right in the abstract. The normal table turns a probability into a z value and nothing more; it does not say which probability suits you. That choice is economic: it depends on what you make on a sale and what you lose on a stockout. If your unit margin is fat and the customer does not come back, push it up. If the margin is thin and the customer waits, bring it down.

From reorder point to order quantity

The reorder point tells you when. The quantity tells you how much, and you rarely choose it freely: the supplier imposes a minimum, freight comes in container sizes, the volume discount starts at some number.

What you can do is measure what each option costs. A big lot lowers unit cost and raises holding cost, locks up more cash and takes longer to give it back. A small lot does the opposite and multiplies fixed ordering costs. The calculation that decides is always the same: the lot's contribution minus the cost of holding it for as long as it takes to sell.

Two cautions. First, the lot result is not money in the bank; it is contribution, and the cash arrives later. Second, if the lot covers many months of sales, forecasting risk grows with every month that passes.

The four families of holding cost

Holding inventory costs money through four separate channels, and it is worth adding them up separately because each one is reduced differently:

Capital. Money sitting in goods is not in the bank and is not paying for anything else. Value it at your cost of finance, or at the best alternative use you have for that money.

Storage. Square metres, racking, rent, temperature control if you need it. It grows in steps: while it fits in the warehouse you already pay for, the marginal cost is near zero; the day it does not fit, it jumps.

Service. Insurance, counting, handling, systems. Usually the smallest and the most stable.

Risk. Obsolescence, damage, shrinkage, theft. The one that varies most by sector and the one most often understated. In a seasonal product it can be the dominant family.

Do not use a "reference" annual rate. The figures circulating in the trade do not come from any identifiable study with a sample, a method, a date and a population: they repeat each other. Add up your four families, divide by your average inventory value, and use that rate. It is the only one that describes your business.

Common mistakes

Confusing average with safe. Holding stock for average demand means running out on half the days.

Using the lead time the supplier quotes. Use the one you have measured, and measure how much it varies too.

Setting one service level for the whole catalog. The product that leaves cents and the one that leaves euros do not deserve the same buffer.

Rounding safety stock down. It breaks the probability you just set.

Forgetting stock in transit. The reorder point is compared against inventory position — on hand plus on order minus allocated — not against what is on the shelf.

Filing holding cost under general overheads. If you cannot see it, you cannot decide against it.

Recalculating once a year. Demand and lead times move. An old reorder point is a scheduled stockout.

Warning signs

  • Repeated stockouts on the same product with a "correct" reorder point: it is almost always the lead time, which has stretched and nobody re-measured it.
  • A safety stock covering more than a full replenishment cycle: you are papering over a lead-time or a lot-size problem with buffer.
  • A lot that covers more months than the product's shelf life.
  • A carrying rate you cannot trace to a calculation.
  • Average inventory growing while sales do not.

When the model stops being reliable

The statistical method assumes demand is roughly normal and independent. In these five cases that assumption breaks and the answer misleads:

Seasonal demand. If you sell four times as much in December, the annual average describes no month at all. Compute per season, using that season's history.

Promotions. A campaign is not natural demand: it is a spike you caused. If it enters the history unmarked, it inflates the mean and the deviation at once and leaves you with an expensive buffer you do not need the rest of the year.

New products. With no history there is no deviation to compute. There you work with judgement, small lots and frequent review — and you say it is judgement.

A single supplier. The model treats lead time as a random variable with a mean. With one supplier the lead time is not random: it is concentrated risk. A strike or a shutdown is not "the tail of the distribution", it is no replenishment at all.

Intermittent demand. Products that sell in small clusters separated by weeks of nothing do not follow a bell curve. Those need different models, and applying the normal formula produces absurd buffers in both directions.

And one more limit that cuts across all of them: this describes one product. A catalog of hundreds also needs a prioritization rule, because you cannot watch everything with the same attention.

The procedure

  1. Pull the product's daily sales history, at least three months.
  2. Compute the mean and standard deviation of daily demand.
  3. Pull the real lead times of your recent orders and compute their mean and deviation.
  4. Mark and set aside promotions and spikes with a known cause.
  5. Choose a cycle service level with margin and stockout cost in mind, and write down why you chose that one.
  6. Compute lead-time sigma and safety stock, rounding up.
  7. Compute the reorder point and compare it with inventory position, not with the shelf.
  8. Add up your four cost families and get your own annual rate.
  9. With that rate, evaluate the lot your supplier is offering.
  10. Repeat with one service level above and one below, and see how much the locked-up cash moves.
  11. Review mean, deviation and lead time every quarter, and always after a change of supplier.

Frequently asked questions

Sources and methodology

Sources

  • Cumulative Distribution Function of the Standard Normal Distribution, NIST/SEMATECH e-Handbook of Statistical Methods, National Institute of Standards and Technology. The critical values quoted here come from this table (0.900 → 1.282; 0.950 → 1.645; 0.975 → 1.960; 0.990 → 2.326), read off the page itself. No territory applies: it is a statistical table. Consulted 9 September 2026; it does not expire. That page says nothing about inventory: linking service level to a z value is a modelling decision made by this guide, not a fact from the source.
  • Reorder Point Formula: Inventory Management Models · A Tutorial, Supply Chain Resource Cooperative, NC State University. Supports the distinction between cycle service level and fill rate, and the point that a product's fill rate comes out higher than its cycle service level. No territory applies. Consulted 9 September 2026. Reviewed annually.

What is not cited, and why. There is no source here for a "typical annual carrying rate" or a "recommended safety stock percentage". We looked, and no identifiable study exists with a sample, a method, a date and a population that applies to ecommerce. So this guide publishes neither figure and teaches you to build both.

Methodology

Every figure in the example is produced by Profyza's calculators — safety stock, reorder point, inventory cost and MOQ — run in sequence with the inputs declared above: the annual rate used in the lot calculation is the one that came out of the inventory cost step, not an assumed one. No figure is typed by hand into the text, and all of them are separately checked against an independent calculation.

The starting figures describe a hypothetical product. They are not any real company's data and they are not industry benchmarks.

Currency and market: euros, European Union.

Last reviewed: 9 September 2026.

Author: Profyza editorial team.

How the figures were produced. Each one is generated by the Profyza calculation engine for that step, using the inputs declared above. Every figure is also cross-checked against an independent arithmetic check — also automated — that recomputes it without calling the engine, which is what catches the text and the calculation drifting apart. It is not a human review, and this piece has not been reviewed by an economist, an accountant or a licensed adviser. If your situation needs that, get it.

Methodology: how all of this is calculated is set out on the methodology page.

Automated mathematical verification: Profyza calculation engines. This is not a human or professional review.

How much history do I need?

For the statistical method, the more the better, and three months of daily data is a reasonable floor. With less, use the simple method and review often.

What do I do with the days I was out of stock?

Those are demand you never saw. Left in as zero sales, they understate demand and your buffer comes out short. Mark them and handle them separately.

Does safety stock get recalculated with every order?

No need. Recalculate it when demand changes, when the lead time changes, or when the supplier changes. Quarterly is a sensible cadence.

Can I use the same z across the catalog?

You can, but you will overpay on low-margin products and come up short on high-margin ones. It is one of the decisions that pays best for differentiating.

What if my supplier's minimum is enormous?

Then the question stops being about inventory and becomes one about negotiation and cash. There is a separate guide for that.

Why won't you give me a carrying rate to start with?

Because it would be invented. The figures in circulation have no study behind them. Adding up your four families takes an afternoon and gives you a number that is actually yours.

See the calculators

Break-even ROAS calculator

Find out how much you can pay for a sale or a click without losing money.

Etsy profit calculator

Strip out the fees, the tax, the materials, the shipping and the ads.

≈ 4 minutes Calculate my Etsy profit

Contribution margin calculator

What each order really leaves you, and how much of that you can spend winning the customer.

Landed cost calculator

What each imported unit really costs once it is sitting in your warehouse, ready to sell.

≈ 4 minutes Work out my landed cost

Maximum profitable CAC calculator

How much you can afford to pay for a customer without giving up your profit.

≈ 3 minutes Work out my maximum CAC

CAC payback period calculator

How many months it takes to recover what you paid to acquire a customer.

Reorder point calculator

The stock level at which you have to place the order to avoid running out.

Safety stock calculator

How many buffer units you need so a deviation does not leave you out of stock.

≈ 4 minutes Work out my safety stock

Inventory carrying cost calculator

What a full warehouse costs you per year, and what share of your inventory that is.

Stockout cost calculator

What running out of stock really cost you, in lost contribution and extra spending.

Bundle profitability calculator

Whether the bundle you are building leaves more money than selling the same items separately.

Maximum profitable discount calculator

How far you can cut the price without falling below the margin you want to keep.

Discount break-even sales calculator

How many more units you have to sell so a discount does not leave you worse off.

Minimum profitable price calculator

The price below which you lose money, and the one your target margin needs.

Cash conversion cycle calculator

How many days pass between paying your supplier and collecting from your customer.

≈ 4 minutes Work out my cash cycle

MOQ profitability calculator

Whether the supplier's minimum order pays off once you have paid to hold it.

Sales channel profitability comparison

Which sales channel leaves most per order for the same product and its real costs.