September 30, 2026

Economic order quantity (EOQ): Formula and examples

If you manage inventory, you've already felt the tension between ordering too much and ordering too often. Economic order quantity (EOQ) is the formula that resolves it.

Here's the formula, how to calculate it, and where it breaks down in practice.

Key takeaways:

  • EOQ is a formula that calculates the ideal order size to minimize total inventory costs. It balances the cost of placing orders against the cost of holding inventory.
  • The EOQ formula is √/(2 * D* S/H), where D is annual demand, S is ordering cost per order, and H is annual holding cost per unit
  • EOQ finds the point where ordering costs and holding costs are equal, minimizing your combined total
  • The formula assumes constant demand, stable costs, and instant replenishment. These simplifications make the math tractable but require real-world adjustments.
  • Pair EOQ with safety stock and reorder points to handle demand variability, lead times, and supplier constraints in practice

What is economic order quantity?

Economic order quantity (EOQ) is the order size that minimizes your total inventory costs by balancing what it costs to place orders against what it costs to hold stock. For financial operations teams, that balance has a direct impact on cash flow and working capital efficiency.

Finance and operations teams use EOQ because it ties an inventory decision directly to cash flow. Order too often and you rack up administrative and shipping costs. Order too much and you tie up cash in stock that just sits there.

Ford W. Harris introduced the EOQ model in 1913, and it's still in use today because the ordering-vs-holding-cost tradeoff it solves for hasn't changed.

The EOQ formula

The economic order quantity formula calculates how many units you should order each time to minimize your total inventory costs. It balances the cost of placing orders against the cost of holding inventory so you're not overordering or reordering too frequently.

The EOQ formula is:

EOQ = √[(2 * D * S) / H]

Where:

  • D is annual demand
  • S is the cost per order
  • H is the annual holding cost per unit

In practice, EOQ answers one question: How many units should you order per purchase to keep your combined ordering and holding costs as low as possible?

Ford W. Harris introduced the EOQ model in 1913 to optimize production lot sizes. More than a century later, it's still widely used because the tradeoff between ordering costs and holding costs hasn't changed.

EOQ variables explained

Annual demand (D) represents how many units you expect to sell or use in a year. For example, a retailer selling 1,000 units of a product annually would use D = 1,000. This figure should reflect realistic demand based on historical data, not aspirational forecasts.

Ordering cost (S) includes every cost incurred each time you place an order, regardless of order size. Common components include:

  • Procurement processing time, such as purchase order creation and approvals
  • Shipping and receiving costs tied to inbound orders
  • Inspection and reconciliation effort once goods arrive

Holding cost (H) is the annual cost of holding one unit in inventory. It typically includes storage, insurance, shrinkage, and the opportunity cost of capital tied up in inventory. You can estimate holding cost as a percentage of the item's unit value, often 15–30%, and then convert that percentage into a dollar amount per unit per year.

VariableMeaningExample
DAnnual demand (units per year)1,000 units
SOrdering cost per order$2 per order
HAnnual holding cost per unit$5 per unit

What EOQ minimizes

EOQ works because it minimizes your total annual inventory cost, which combines the cost of placing orders with the cost of holding inventory over time.

Total annual inventory cost can be expressed as:

Total annual inventory cost = (D / Q) * S + (Q / 2) * H

Where Q is the order quantity in units. The first term is total ordering cost for the year, based on how often you place orders. The second term is total holding cost, based on the average inventory you carry.

At the EOQ point, annual ordering cost equals annual holding cost. That's the mechanism the formula optimizes: EOQ is the value of Q where those two costs intersect and their combined total is at its minimum.

Using the article's running numbers (D = 1,000, S = $2, H = $5) and the EOQ of about 28 units calculated below: ordering cost works out to roughly (1,000/28) * $2 ≈ $71, and holding cost works out to roughly (28/2) * $5 = $70. They land at essentially the same value, which is what "the two costs are equal at EOQ" looks like in practice.

Order less than EOQ, and you're placing too many orders. Order more, and you're carrying too much inventory.

Components of the EOQ formula

Each EOQ variable represents a real operational decision. Estimating these inputs accurately matters more than the formula itself, because small errors can change the result significantly. The reliability of your EOQ output depends entirely on how accurately you estimate D, S, and H, so the next three sections break down how to get each one right.

Annual demand (D)

Annual demand represents how many units you expect to sell or use in a year. Historical sales or usage data, adjusted for growth or contraction, is often the most reliable starting point.

Seasonality complicates demand estimation. When demand fluctuates throughout the year, EOQ still works best when applied to average annual demand, paired with separate safety stock calculations to handle variability.

Common sources for demand data include:

  • Historical sales records.
  • Production or usage logs
  • Forecasts from sales or planning teams

If you don't have a full year of history, extrapolate from the most recent quarter and adjust for seasonality. Pull D from your enterprise resource planning (ERP) system's sales history or point-of-sale (POS) data, and adjust for known growth or contraction trends.

For example, if you sold 300 units in Q4, annualizing that quarter alone gives you roughly 1,200 units. But Q4 usually runs hot for retail, so you'd adjust that figure down before treating it as your annual D, not use the raw extrapolation. The goal is a realistic estimate of typical demand, not the best (or worst) quarter you had.

Ordering cost (S)

Ordering cost is the total cost of placing and receiving a single order, regardless of how many units you buy. EOQ works best when S reflects the average cost of a typical order, not just supplier pricing.

Common ordering cost components include:

  • Vendor communication, quality checks, and invoice reconciliation
  • Inbound freight and receiving labor

Even if these costs seem small individually, they add up quickly when orders are placed frequently. Underestimating ordering costs pushes EOQ too low, leading to excessive reordering and unnecessary administrative overhead.

To calculate S, sum all costs from the procurement workflow: PO creation time, approvals, shipping, receiving, quality checks, and invoice processing. If PO creation and approvals are eating the most staff time, that's usually the easiest piece of S to shrink: Ramp Procurement automates PO creation, approvals, and receiving, eliminating 46 hours/month of manual purchasing work for the finance teams that use it. When ordering costs drop that much, recalculate EOQ. A lower S pushes your optimal order size down, since you can afford to order more often without the administrative cost adding up.

Holding cost (H)

Holding cost captures the ongoing cost of keeping inventory on hand. This typically includes storage space, insurance, spoilage, and disuse.

Opportunity cost is often the largest hidden component, and it's the one teams most often leave out. Capital tied up in inventory can't be used for growth, debt reduction, or investment elsewhere, so leaving it out of H systematically understates your true holding cost.

You can express holding cost as a dollar amount per unit per year or as a percentage of unit value. Convert that percentage to dollars before plugging it into the EOQ formula.

For example, a 20% holding rate on a $25 unit gives you H = $5 per unit per year (0.20 * $25).. Calculate H as a percentage of unit value (typically 15–30%) and convert it to a dollar figure, including warehouse rent, insurance, shrinkage, and the opportunity cost of capital.

How to calculate EOQ

Calculating economic order quantity isn't complicated, but it does require disciplined inputs. The formula only works if demand, ordering costs, and holding costs are measured consistently and expressed on the same annual basis.

Before you calculate EOQ, make sure you're using annualized figures and that you've captured all costs tied to placing and holding inventory, not just the obvious ones. Working through the steps below in order will help you avoid the most common input errors.

  1. Estimate annual demand (D) using historical sales or usage data.
  2. Calculate ordering cost per order (S) by summing all fixed costs tied to placing an order.
  3. Estimate annual holding cost per unit (H).
  4. Plug the values into the EOQ formula.
  5. Interpret the result as units per order.

Once you've worked through these steps, EOQ gives you a repeatable ordering rule you can apply across products. The real value comes from revisiting the calculation as conditions change, such as when demand shifts, suppliers update pricing, or internal processes become more efficient.

EOQ is a baseline you refine as your inventory strategy matures, not a one-time answer.

EOQ calculation example

Assume a business orders one,000 units per year. Each order costs $2 to place, and holding one unit in inventory for a year costs $5.

  • EOQ = √[(2 * D * S) / H]
  • EOQ = √[(2 * 1,000 * 2) / 5]
  • EOQ = √[4,000 / 5]
  • EOQ = √800 ≈ 28.3 units

In this case, the cost-minimizing order size is about 28 units per order. In practice, you'd round to a workable quantity, such as 28 or 30 units.

Common calculation mistakes

Minor errors in EOQ inputs can produce misleading results:

  • Mixing time periods: If demand is annual, ordering and holding costs must also be annualized, or the output won't be meaningful.
  • Incorrectly calculating holding costs: Excluding capital costs or obsolescence risk understates H, which pushes EOQ too high
  • Forgetting ordering cost components: Ignoring internal processing time understates S, which biases EOQ toward smaller, more frequent orders.
  • Ignoring opportunity cost in holding cost (H): Counting only warehouse rent and insurance and skipping the opportunity cost of tied-up capital understates H and inflates EOQ.

Why you should use EOQ

EOQ helps you avoid two costly extremes. Over-ordering ties up cash in excess stock and increases storage costs, while under-ordering drives up shipping costs through frequent reorders and raises your stockout risk.

EOQ balances two costs to find your optimal order size:

  • Lower total inventory costs: EOQ finds the order size where ordering costs and holding costs are at their combined minimum, so you're not overspending on either side.
  • More predictable cash flow: When ordering is systematic rather than reactive, you can forecast inventory spend more accurately and avoid surprise cash crunches from bulk purchases.
  • Fewer stockouts: EOQ makes reorder timing data-driven rather than gut-driven. Paired with reorder points, it reduces the chance of running out of stock between orders.
  • Better supplier relationships: Consistent, predictable ordering patterns make you a more reliable customer, which can lead to better terms and fewer expedited-shipping charges.

EOQ gives your procurement team a repeatable rule for ordering, and when paired with real-time spend data, it becomes the foundation for a disciplined inventory strategy. Teams looking to strengthen supplier performance management will find that EOQ-based ordering patterns make those conversations easier.

EOQ assumptions and limitations

EOQ relies on simplifying assumptions that make the math tractable. Understanding these assumptions helps you know when EOQ works well and when it needs adjustment.

AssumptionWhat EOQ assumes
Demand is constant and knownLets the model focus on cost tradeoffs rather than forecasting uncertainty
Replenishment is instantaneousInventory arrives all at once instead of gradually over time
Ordering and holding costs are stableCosts don't change as order size varies

EOQ works best for stable, high-volume items with predictable demand. It becomes less reliable when demand is volatile, lead times are long, or suppliers impose rigid constraints.

Real-world adjustments to EOQ

In practice, you'll typically use EOQ alongside other inventory controls: EOQ answers "how much" to order, reorder points answer "when" to order, and safety stock answers "how much buffer" to carry, with quantity discounts and ABC analysis layered on top.

Quantity discounts can shift the optimal order size. In these cases, EOQ serves as a baseline, which you then compare against discounted price breaks to identify the true minimum total cost.

Lead times matter because EOQ determines how much to order, not when. Reorder points fill that gap by accounting for expected demand during replenishment.

Safety stock protects against demand variability and supply delays. EOQ sets order size, while safety stock influences how much buffer inventory you carry.

ABC analysis helps you prioritize which stock-keeping units (SKUs) to apply EOQ to. "A" items (high-value, lower-volume) benefit most from optimized order sizing, while "C" items may not justify the analysis.

EOQ in practice

EOQ becomes most useful when you apply it to real purchasing decisions rather than treating it as a theoretical exercise. Different industries face different constraints, from storage limitations to volatile demand patterns, and EOQ helps clarify where inventory costs are actually coming from.

EOQ in different industries

Retail businesses often use EOQ for staple SKUs with steady demand. For example, a retailer selling 10,000 units annually with moderate holding costs may reduce carrying costs by shifting from monthly bulk orders to EOQ-based ordering.

Manufacturers apply EOQ to raw materials, especially when ordering costs are high and storage space is limited. A manufacturer facing high per-order freight costs typically lands on a larger EOQ than a retailer whose reorders are cheap and frequent, since a bigger S pushes the optimal order size up.

E-commerce and dropshipping businesses may rely less on EOQ for physical inventory but still use it when holding private-label stock. Finance teams in these businesses often find that tightening their accounts payable processes alongside EOQ-based ordering gives them a clearer picture of true inventory costs.

EOQ vs. other inventory models

EOQ is one of several inventory models used to manage stock levels, and it works best when you understand how it compares to alternatives:

ModelPrimary goalStrengthsLimitationsBest use cases
EOQMinimize total inventory costSimple, quantitative, easy to model in spreadsheetsAssumes stable demand and instant replenishmentHigh-volume SKUs with predictable demand and known costs
Just-in-Time (JIT)Minimize inventory on handReduces holding costs and storage needsHighly sensitive to supply disruptionsManufacturing or operations with reliable suppliers and short lead times
ABC analysisPrioritize inventory management effortFocuses attention on high-impact itemsDoes not determine order quantitiesPortfolio-level inventory control and resource allocation
Safety stock modelsPrevent stockoutsAbsorbs demand and lead-time variabilityIncreases holding costsVolatile demand or uncertain supply chains
EPQ (Economic Production Quantity)Minimize production and inventory costsAccounts for gradual replenishmentMore complex than EOQManufacturing operations with in-house production and steady demand

EOQ vs. MOQ

Minimum order quantity (MOQ) is the smallest amount a supplier will let you buy; EOQ is the order size that minimizes your total inventory cost.

When a supplier's MOQ is higher than your EOQ, the MOQ wins and you order the minimum. EOQ then becomes your benchmark for the extra holding cost that minimum forces on you: if your EOQ is 28 units but the supplier's MOQ is 50, you order 50 and use EOQ to quantify the cost of carrying the extra 22 units, or to make the case for negotiating a lower MOQ.

What it setsWho controls it
EOQThe order size that minimizes your total inventory costYou, based on your demand, ordering, and holding costs
MOQThe smallest quantity a supplier will sell youYour supplier

EOQ calculators and tools

EOQ calculators and spreadsheets can speed up calculations, but they only work if the underlying inputs are accurate. These tools are most useful once you understand how demand, ordering costs, and holding costs interact in the EOQ formula.

Many free EOQ calculators are available online, and most rely on the same core equation. They're helpful for quick checks, but you should still validate the assumptions behind the numbers you enter.

In Excel, the EOQ formula looks like:

=SQRT((2 * D * S) / H)

Inventory management software can also support EOQ modeling:

  • Centralized purchasing data improves demand estimates
  • Automated procurement workflows reduce assumed ordering costs by streamlining approvals and processing.
  • Real-time visibility helps validate EOQ outputs against actual usage and spend patterns.
tip
"The real bottleneck usually isn't the formula; it's getting reliable inputs into it."

Ramp's AI accounting software auto-codes every inventory purchase in real time (GL, department, vendor, cost center), so your D, S, and H come from live spend data instead of a hand-built spreadsheet.

How to build an EOQ spreadsheet

A simple EOQ spreadsheet typically includes inputs for annual demand (D), ordering cost (S), and holding cost (H), along with calculated EOQ and total cost outputs.

Building one takes three steps:

  1. Add three input cells for D, S, and H.
  2. Add an EOQ cell using the formula =SQRT((2*D*S)/H).
  3. Add a total-cost cell using =(D/EOQ)*S+(EOQ/2)*H, so you can see the total cost at the optimal order quantity, not just the quantity itself.

By linking those input cells to live sales and purchasing data, you can automatically recalculate optimal order sizes as conditions change instead of updating the spreadsheet by hand.

Automate inventory spend analysis with Ramp

Determining optimal order quantity requires accurate data on inventory costs, usage patterns, and supplier spend, but most teams still piece together spreadsheets, invoices, and purchase orders by hand. Ramp's accounting automation software gives you real-time visibility into inventory spend and usage patterns so you can make smarter ordering decisions without the manual work.

You get every inventory purchase automatically captured and coded as it happens, tagged with custom fields like vendor, product category, and cost center. You'll see exactly what you're spending on inventory, when orders are placed, and how costs fluctuate over time. Ramp's AI learns your coding patterns and applies them across all transactions, so your inventory expenses are categorized consistently and accurately.

When it's time to analyze ordering patterns, you can surface trends in purchase frequency, order sizes, and supplier costs. You can track which items are reordered most often, identify seasonal demand shifts, and spot opportunities to consolidate orders or negotiate better terms. You'll also catch duplicate purchases and unusual spending patterns before they impact your bottom line.

With Ramp handling data collection and categorization, you can focus on what matters. Calculate economic order quantities, compare supplier pricing, and optimize reorder points based on actual usage data instead of guesswork.

Try an interactive demo to see how Ramp automates inventory spend tracking and analysis.

Try Ramp for free
Share with
Ken Boyd•Accounting and finance expert
Ken Boyd is a former CPA, accounting professor, writer, and editor. He has written four books on accounting topics, including The CPA Exam for Dummies. Ken has filmed video content on accounting topics for LinkedIn Learning, O’Reilly Media, Dummies.com, and creativeLIVE. He has written for Investopedia, QuickBooks, and a number of other publications. Boyd has written test questions for the Auditing test of the CPA exam, and spent three years on the Audit staff of KPMG.
Ramp is dedicated to helping businesses of all sizes make informed decisions. We adhere to strict editorial guidelines to ensure that our content meets and maintains our high standards.

FAQs

If demand isn't constant, EOQ still provides a useful baseline, but it shouldn't be used in isolation. Safety stock and reorder points become more important to account for variability and avoid stockouts.

Recalculate EOQ whenever a core input changes in a meaningful way. That includes shifts in demand, changes in supplier pricing or shipping terms, or process improvements that lower ordering costs.

EOQ is calculated per item, not across products. Each SKU needs its own calculation because demand, costs, and storage constraints vary between items.

EOQ determines how much to order, not when to order. Reorder points fill that gap by accounting for lead time and expected demand during replenishment.

A supplier minimum can override EOQ by forcing you to order more than the calculated optimal quantity. EOQ then works as a benchmark for the cost of carrying the extra units.

“I assumed I would have to choose between speed and control. What I found is that you can have both. A well-designed system takes friction out, for the finance function and for everyone else.”

Justin Webster

CFO, Denver Broncos

What it takes to pay for an NFL season: inside the Denver Broncos’ finance rebuild

“A well-run district should not have to choose between getting work done at the school site and keeping control of the dollars behind it. We're not hiring more people to do more jobs, so we have to be smarter about the process. With Ramp, the purchase, the receipt, and the record stay together from the start. ”

Nick Brizeno

Director of Purchasing, San Marcos Unified School District

San Marcos Unified gives maintenance teams room to act — and finance a clear record of their spend across 19 schools

“In senior living, scale only works if the communities still feel personal. We needed the back office to carry more of the complexity, not the people serving residents. Ramp helped us build that infrastructure, so the experience in the community could stay human.”

Ryan Cole

CFO, Agemark Senior Living

How the family-owned business behind 28 senior living communities rebuilt finance to close 19 days faster

“AI is moving faster than the finance context around it. Prices change, models change, and the value is not always obvious from an invoice. We needed enough detail to know which bets deserved more investment — and which ones did not.”

Greg Cooley

Controller, AngelList

From purchase requests to 409 API keys: How AngelList puts spend under owner-level control

“Invoices, cards, tokens. The categories change but the principle doesn't: know where the money is going, remove the work around it, and make sure the spend is worth it.”

Maciej Mylik. Finance

ElevenLabs

ElevenLabs speaks more than 70 languages but its money speaks the same one

“We weren’t trying to retrofit an old finance system. We had a blank canvas, and Ramp gave us the foundation to build a global finance function of the future.”

Justin Dourado

Director of Finance, Othership

How Othership’s first finance hires built one operation across Canada and the U.S.

“There's just no surprises anymore. No more waiting two months to find out how a job did. We know how it's doing as it's happening.”

Erich Kuss

Financial Systems Manager, Infinity Home Services

Infinity Home Services prevents the margin leak nobody can see from the ground, so its 20+ local companies build what they bid

“More token spend isn’t proof that AI is working. Less isn’t proof that it isn’t. What matters is whether we’re buying the right level of intelligence for the work. Ramp lets us make that judgment in the same place we manage every other type of spend.”

Cody Nutt

Senior Director of Business Systems, Daxko

How Daxko put every AI token on the same operating system as every dollar