Economic Order Quantity (EOQ) Formula in Excel
By ExcelReady TeamUpdated 6 min read
The short answer
The EOQ formula is the square root of 2 × annual demand × cost per order ÷ holding cost per unit per year. In Excel, with demand in B2, order cost in B3 and holding cost in B4, type =SQRT(2B2B3/B4). Wrap it in ROUND for whole units, and keep every input in the same time period.
Key takeaways
- EOQ = √(2DS ÷ H), where D is annual demand, S is the cost per order and H is the holding cost per unit per year.
- In Excel: =SQRT(2B2B3/B4). =(2B2B3/B4)^0.5 gives the same answer.
- If holding cost is a percentage of unit cost, multiply them first: H = rate × unit cost.
- Use ROUND for the nearest unit, ROUNDUP to never order short, or CEILING to fit a case size.
- EOQ assumes steady demand and fixed costs, so treat it as a starting point, not a final answer.
On this page+
The EOQ formula in Excel is =SQRT(2*D*S/H): the square root of two times annual demand times the cost of placing one order, divided by the cost of holding one unit for a year. EOQ stands for economic order quantity, the order size that keeps the combined cost of ordering and storing stock as low as possible. This guide sets it up step by step with example figures, shows how to round it, and explains when the result can mislead you. It is a calculation guide, not advice for any real business.
What is economic order quantity?#
Economic order quantity is the number of units to order each time so that your total yearly ordering and holding costs are as small as possible.
Two costs pull in opposite directions:
- Ordering costs go down when you order in bigger batches, because you place fewer orders.
- Holding costs go up with bigger batches, because more stock sits on the shelf on average.
EOQ is the balance point between them. At the exact EOQ, the yearly ordering cost and the yearly holding cost are equal.
The formula is:
EOQ = √(2 × D × S ÷ H)| Letter | Meaning | Example value |
|---|---|---|
| D | Annual demand, in units | 12,000 |
| S | Cost of placing one order (admin, delivery fee) | 50 |
| H | Cost of holding one unit for one year | 3 |
All values in this guide are made-up examples.
How to calculate EOQ in Excel#
Put each input in its own labelled cell so you can change it later. With the values in B2:B4:
Type the labels in A2:A4 and the values in B2:B4.
Click B6 and type:
Excel formula=SQRT(2*B2*B3/B4)Press Enter. The result is 632.46.
SQRT returns the square root of a number. You can also raise to the power of 0.5, which is the same thing: =(2*B2*B3/B4)^0.5 or =POWER(2*B2*B3/B4,0.5). The guide to square roots and powers in Excel explains both.
You don't need brackets around 2*B2*B3/B4 inside SQRT, because Excel works left to right through multiplication and division. Brackets are still a good habit if you rearrange it: =SQRT((2*B2*B3)/B4) is easier to read.
How to round EOQ to whole units#
You can't order 632.46 units, so round the result. Pick the rounding that matches how you buy:
| Goal | Formula | Result |
|---|---|---|
| Nearest whole unit | =ROUND(SQRT(2*B2*B3/B4),0) | 632 |
| Never round down | =ROUNDUP(SQRT(2*B2*B3/B4),0) | 633 |
| Full cases of 12 | =CEILING(SQRT(2*B2*B3/B4),12) | 636 |
ROUND's second argument is the number of decimal places, so 0 means whole numbers. The ROUND function guide and the guide to ROUND, ROUNDUP and ROUNDDOWN cover each one. Rounding changes the stored value, unlike number formatting, which only changes what you see.
Rounding barely affects cost here: the total yearly cost at 632, 633 or 636 units is within about 1 of the minimum.
Holding cost as a percentage of unit cost#
Holding cost is often given as a yearly percentage of the item's cost, not as an amount. It covers storage, insurance, damage and the money tied up in stock. Turn it into an amount per unit first:
H = holding rate × unit costIf an item costs 15 and the holding rate is 20% a year, H is 0.2 × 15 = 3. In Excel, with unit cost in B7 and the rate in B8, the EOQ becomes =SQRT(2*B2*B3/(B8*B7)). Here the brackets around B8*B7 are essential. Without them, Excel divides by B8 and then multiplies by B7.
If you need to work out the unit cost first, the guide to cost per unit in Excel shows how.
Orders per year, total cost and reorder point#
Once you have the EOQ, a few more numbers help you plan. With the rounded EOQ of 632 in B6:
| What | Formula | Result |
|---|---|---|
| Orders per year | =B2/B6 | 18.99 |
| Days between orders | =365/(B2/B6) | 19.2 |
| Yearly ordering cost | =B2/B6*B3 | 949.37 |
| Yearly holding cost | =B6/2*B4 | 948.00 |
| Total yearly cost | =B2/B6*B3+B6/2*B4 | 1,897.37 |
The holding cost uses B6/2 because, on average, half the order is on the shelf.
To see why EOQ is the best size, compare other order sizes with the same total cost formula. Ordering 300 at a time costs 2,000 + 450 = 2,450 a year. Ordering 1,000 at a time costs 600 + 1,500 = 2,100. Both are higher than 1,897.37.
The reorder point tells you when to order: daily demand × lead time in days. With a 7-day lead time, =ROUNDUP(B2/365*7,0) gives 231 units. Many businesses add safety stock on top. An inventory tracker can flag items that fall below their reorder point.
Limits of the EOQ formula#
EOQ is a simple model, and its answer is only as good as its assumptions. It assumes:
- Demand is steady and known for the whole year.
- The cost per order and holding cost don't change.
- The whole order arrives at once.
- There are no bulk discounts.
- You never run out of stock.
Real demand is seasonal, suppliers set minimum order sizes, and prices change with volume. Use EOQ as a starting point and check it against those real constraints. The guide to Excel skills for supply chain jobs shows where calculations like this fit in day-to-day work.
Common mistakes with EOQ in Excel#
- Mixing time periods. Monthly demand with a yearly holding cost gives a wrong EOQ. Convert everything to a year.
- Using a percentage as H. Typing 20% as the holding cost instead of 20% × unit cost gives a far larger, wrong result.
- Missing brackets in the divisor.
/B8*B7is not the same as/(B8*B7). - Rounding the inputs. Round only the final EOQ.
- Hard-coding numbers.
=SQRT(2*12000*50/3)works, but cell references let you test other values instantly.
Practise it#
Try the exercise on this page to calculate the EOQ with SQRT and ROUND. Then practise ROUND, ROUNDUP and ROUNDDOWN in a live spreadsheet, and work through the department budget practice, which combines SUM, AVERAGE, ROUND and absolute references on a realistic sheet. Each lesson checks your formula instantly.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
The example inputs are in B2:B4. In B6, calculate the economic order quantity with SQRT(2*B2*B3/B4), rounded to the nearest whole unit with ROUND, then press Enter.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Value | |||
| 2 | ||||
| 3 | ||||
| 4 | ||||
| 5 | ||||
| 6 | EOQ (units) | |||
| 7 | ||||
| 8 | ||||
| 9 |
Tip: Multiply 2 by demand and order cost, divide by holding cost, take the square root with SQRT, then wrap it in ROUND(...,0).
Practise this in a lesson
Frequently asked questions
What is the EOQ formula in Excel?
Use =SQRT(2DS/H) with cell references, for example =SQRT(2B2B3/B4), where B2 is annual demand, B3 is the cost per order and B4 is the holding cost per unit per year.
How do I calculate holding cost for EOQ?
Holding cost is what it costs to keep one unit in stock for a year, such as storage, insurance and the cost of tied-up money. It is often given as a percentage of the unit cost, so multiply them: 20% of a 15 item is 3 per unit per year.
Should I round EOQ up or down?
You can't order part of a unit, so round to a whole number. ROUND gives the nearest unit, ROUNDUP avoids ordering slightly too few, and CEILING rounds up to a pack size such as 12. The total cost changes very little near the EOQ.
What are the assumptions of the EOQ model?
EOQ assumes demand is steady and known, the cost per order and holding cost are fixed, the whole order arrives at once, there are no bulk discounts, and you never run out of stock. Real situations rarely match all of these.
How do I calculate the number of orders per year?
Divide annual demand by the order quantity. With demand of 12,000 units and an EOQ of 632, =12000/632 gives about 19 orders a year.