Newsvendor model: order once, and the average is the wrong number

A single order against demand you will see once. Type what one unit left over costs you and what one unit short costs you, and every quantity on your table shows its own bill, including the two either side of the one you were about to pick. The average demand is usually not one of them.

Live result
Ordering 500 units costs $39,240 on average, and one of the quantities beside it costs less.
  • the quantity one step down400
  • what one step down costs$66,240
  • the quantity one step up600
  • what one step up costs$27,240
  • next step in units100
  • what that step does to the bill−$12,000
How far the next step moves the bill follows from where your chances sit on the table.

Try a scenario

What each quantity costs

What each quantity costs on averageSeven quantities from 200 to 800 units and what each costs on average, split into the cost of leftovers and the cost of shortfalls. The quantity selected is 500 units at $39,240, with 400 units at $66,240 and 600 units at $27,240 either side of it. Average demand, 513 units, is marked and is not one of the seven.$66,240$39,240$27,240
Horizontal
Quantity you order, units
Units
Money in dollars, shown to the nearest dollar. Quantities in whole units.
Quantity selected500 units
$39,240
Expected units sold445 units
Expected units left over55 units
Expected units short68 units
60%
500units
$

Shown in any single currency; the arithmetic is identical.

$

The demand you are buying against

Try a shape

units
units
%
%
%
%
%
%
%

Your chances come to 100%.

What the next hundred units does

What the next step doesWhat each step of 100 units does to the bill. The first four steps take it down, by $45,000, $39,000, $27,000 and $12,000. The step from 600 to 700 units changes nothing, and the step from 700 to 800 adds $7,200.
Horizontal
Quantity you order, units
Basis
Each bar is the change in that average from one row of your table to the next.
Units
Money in dollars, shown to the nearest dollar, signed against the row below.
Assumptions
The two prices hold at every quantity.

The staircase and the ratio

The staircase and the ratioThe chance demand is at or below each quantity, as a staircase from 5% at 200 units to 100% at 800. The ratio of the two prices is 0.80, and the first tread at or above it is 600 units.chance of covering demand
Basis
Fixed at the original example values; the last quantity always reaches 100%.
Units
A share of the example probabilities, shown to the nearest percent.
Assumptions
The seven probabilities and both prices stay at the original example values.

What the ratio is

Your two prices make one . A unit short costs $480, a unit left over costs $120, and the shortfall is 0.80 of the two together. Read that number across the staircase and it lands on 600, the first quantity whose chance of covering demand reaches it.

That is a description of your own table, not an instruction. It does not know whether you have room for 115 units, whether the money is there this quarter, whether the supplier will split the order, or whether $480 is really what a shortfall costs you. It also moves in steps rather than smoothly. Anywhere above $180 a unit short and up to $480, the row the ratio lands on does not move at all, which is worth knowing before anybody argues about the second decimal place.

Where this page does not apply

This page is for a quantity you commit once. One order, one window, and no chance to place another inside it before you find out what demand was. Spares that ship with the equipment, a line built for one season, a run made for one event, a part whose supplier closes the book on a date.

If you can order again inside the window, none of this arithmetic applies. What decides the quantity then is a reorder point and a lot size, and the leftovers you are pricing here are simply next month's opening stock.

Here is the maths

The formula, in words

  • Two prices, and neither of them is the unit price. What matters is what changes when you order one more: it either sits there afterwards, costing you what you paid net of whatever you recover, or it is not there when it is wanted, costing you what that absence costs. A cost you pay whichever quantity you choose does not belong in either figure, because it cannot move the choice.
  • A quantity's bill is two expectations added together. For each row of your table, work out how many units would be left over and how many would be missing, weight each by the chance of that row, price the two at your two prices, and add. Revenue is nowhere in it. This compares quantities against each other and deliberately does not rebuild an income statement.
  • Only the rows can win. Between two adjacent rows the bill changes by the same amount for every unit, so it is a straight line with no bend inside the gap. A straight line has its lowest point at one end. The calculation therefore lands on rows, and nothing is rounded away.
  • The step and the ratio are the same fact. Moving up one row costs you the leftover price on every outcome at or below where you are, and saves you the shortfall price on every outcome above it. Setting those equal gives one number, the shortfall price as a share of the two together, and the step turns from saving to costing exactly where the cumulative chance passes it. The step chart is the staircase chart, measured from that number instead of from zero.
  • It lands on a tread, so it lands in jumps. The ratio is a smooth number and the staircase is not. Two quite different shortfall prices often land on the same row, and a small change can move the landing by a whole row. Both behaviours are the arithmetic being honest about a table with seven rows in it.

A worked example

The table as shipped. Seven rows 100 units apart, from 200 to 800, with the chances typed against them.

DemandChanceCumulativeContribution to the average
2005%5%10
30010%15%30
40020%35%80
50025%60%125
60020%80%120
70012%92%84
8008%100%64

The chances come to 100%, so no normalising is needed on the shipped table. The average demand is 10+30+80+125+120+84+64=51310 + 30 + 80 + 125 + 120 + 84 + 64 = 513 units, and 513 is not one of the seven outcomes. Demand will be 200 or 300 or 400 or 500 or 600 or 700 or 800. It will never be 513.

The two prices. A unit costs $180 and a leftover recovers $60, so a leftover costs 180−60=120180 - 60 = 120 dollars. A unit short is expedited and waited for, at $480. The ratio is 480÷(480+120)=0.80480 \div (480 + 120) = 0.80.

One quantity, walked in full: 600 units. Units left over, weighted: (600−200)×0.05+(600−300)×0.10+(600−400)×0.20+(600−500)×0.25=20+30+40+25=115\begin{aligned}&(600-200)\times 0.05\\&+(600-300)\times 0.10\\&+(600-400)\times 0.20\\&+(600-500)\times 0.25\\&=20+30+40+25=115\end{aligned} units. Units short, weighted: (700−600)×0.12+(800−600)×0.08=12+16=28(700-600)\times 0.12 + (800-600)\times 0.08 = 12 + 16 = 28 units. Units sold: 513−28=485513 - 28 = 485, and the two checks hold, 485+115=600485 + 115 = 600 and 485+28=513485 + 28 = 513. The bill: 120×115+480×28=13,800+13,440=27,240120 \times 115 + 480 \times 28 = 13{,}800 + 13{,}440 = 27{,}240 dollars.

The staircase, all seven rows.

QuantityLeft overShortWhat the leftovers costWhat the shortfalls costThe billThe next step
2000313$0$150,240$150,240−$45,000
3005218$600$104,640$105,240−$39,000
40020133$2,400$63,840$66,240−$27,000
5005568$6,600$32,640$39,240−$12,000
60011528$13,800$13,440$27,240$0
7001958$23,400$3,840$27,240+$7,200
8002870$34,440$0$34,440no step
The steps, checked against the formula. Each step is 100×(600F−480)100\times(600F-480), where FF is the cumulative chance, and the same step is 100×600×(F−0.80)100\times600\times(F-0.80). At 500 the cumulative is 0.60, so the step is 100×600×(0.60−0.80)=−12,000100 \times 600 \times (0.60 - 0.80) = -12{,}000 dollars, and 39,240−12,000=27,24039{,}240 - 12{,}000 = 27{,}240 matches the row below it. At 600 the cumulative is 0.80, exactly the ratio, so the step is zero and the two rows cost the same to the dollar. At 700 the cumulative is 0.92, so the step is 100×600×0.12=7,200100 \times 600 \times 0.12 = 7{,}200 dollars, and 27,240+7,200=34,44027{,}240 + 7{,}200 = 34{,}440.

Where the ratio lands, and the tie it produces. The first cumulative chance at or above 0.80 is the one against 600 units, and it is 0.80 exactly. That equality is why 600 and 700 cost the same: the step between them is zero. On these numbers the arithmetic has no preference between two quantities 100 units apart, and the difference between them is 80 more units of stock on average against 20 fewer units of shortfall. That is not a defect of the model. It is the model finishing its work and handing the decision back.

What the average costs. The row nearest the average demand is 500 units, and it costs $39,240 against $27,240 at the two rows the ratio reaches. That is $12,000 more, or 44% more, for picking the number a forecast hands you. The forecast itself, read as a certainty, predicts a bill of nothing at all: buy 513, sell 513. No quantity on the table costs nothing, and the lowest bill available is $27,240.

How far the prices can move before the row does. With a leftover at $120, the row the ratio lands on stays at 600 units for every shortfall price above 120×0.60÷0.40=180120 \times 0.60 \div 0.40 = 180 dollars and up to 120×0.80÷0.20=480120 \times 0.80 \div 0.20 = 480 dollars. A shortfall price anywhere between $181 and $480 lands on the same row, a range of more than two and a half times, which is a useful thing to know before a meeting spends an hour on whether it is $300 or $400.

Service, which is the output rather than the input. The chance of covering demand entirely is the cumulative chance itself: 35% at 400 units, 60% at 500, 80% at 600. The share of demand met from stock is one minus the expected shortfall over the average: 1−133513=74.1%1 - \frac{133}{513} = 74.1\% at 400, 1−68513=86.7%1 - \frac{68}{513} = 86.7\% at 500, 1−28513=94.5%1 - \frac{28}{513} = 94.5\% at 600. Nobody typed a service level and two of them came out anyway, which is the sentence that connects this page to both of its neighbours.

The same average, three shapes.

ShapeChances, 200 to 800AverageRow the ratio lands onThe bill there
As typed5, 10, 20, 25, 20, 12, 8513600$27,240
Tighter2, 6, 20, 38, 21, 9, 4513600$20,640
A longer tail5, 10, 22, 26, 16, 9, 12513700$29,640

Same average, same two prices, three different bills and two different rows. Under Tighter the cumulative runs 2, 8, 28, 66, 87, 96, 100, so 0.80 still lands on 600 and the bill there is 120×104+480×17=12,480+8,160=20,640120 \times 104 + 480 \times 17 = 12{,}480 + 8{,}160 = 20{,}640 dollars: $6,600 less for knowing more, with nothing else changed. Under A longer tail the cumulative runs 5, 15, 37, 63, 79, 88, 100, so 0.80 clears 600 by a single point and lands on 700, where the bill is 120×199+480×12=23,880+5,760=29,640120 \times 199 + 480 \times 12 = 23{,}880 + 5{,}760 = 29{,}640 dollars.

What this does not model

Anything that recovers value from a leftover other than at the price typed, including a second season, a transfer to another site or a warranty pool. A shortfall that costs differently depending on how short you are or how long it lasts. Substitution, where a customer takes something else and the shortfall costs less than typed, and its opposite, where a shortfall loses the account. Any chance to react partway through with a second, smaller commitment, which changes the answer and generally lowers the first order. Quantity breaks, minimum order quantities, pallet and container rounding, and the supplier's own lot size. Where the seven chances came from, which is the input carrying the most weight and the least evidence: a short history misses the tail, a trend makes old periods incomparable, and a judgement folded into a rounded forecast cannot be argued with. And the largest omission of all: a cost taken from an allocation rather than from cash moves the arithmetic for reasons that have nothing to do with the decision.

Check it yourself

The average demand is 513 units in all three tables, the two prices never move, and the row the ratio lands on goes 600, 600, 700 while the bill at that row goes $27,240, $20,640, $29,640. Nothing about the average changed and the answer did. Units sold plus units left over are 485+115485 + 115, and units sold plus units short are 485+28485 + 28. At 600 units the table says 485 units sold, 115 left over and 28 short, and 485 plus 115 is the 600 you ordered while 485 plus 28 is the 513 you expected to want.

Basis
Each bill is the average across the seven outcomes in your table, weighted by the chances you typed.
Assumptions
One order. No reordering inside the window. Leftovers cost what you typed, shortfalls cost what you typed.
Model version
1.0

This page works out the consequences of numbers you type and does not recommend a quantity. The arithmetic is standard single period newsvendor algebra, stated in the page's own words: the books named below are described and cited, and no table, definition or wording is reproduced from any of them. Its weakest input is the seven chances, which are an estimate, and no result here is more accurate than that estimate. Sources named for this lesson are Cachon and Terwiesch, Matching Supply with Demand, 4th edition; Chopra, Supply Chain Management, 7th global edition, chapter 13; Hillier and Lieberman, Introduction to Operations Research, sections 7.5 and 13.9; and Savage, The Flaw of Averages.