Industrial Engineering Calculator

Economic Order Quantity (EOQ) Calculator

Determine the theoretical optimal order quantity (Q*) that minimizes total inventory management costs based on the classic Harris deterministic model.

Inventory Level Model

Classic Sawtooth Diagram (Constant Demand & Instant Replenishment)

THEORETICAL MODEL
Time (t)QuantityAvg Inv (Q/2)Q* (EOQ)Demand Rate (D)Cycle Time (T)

Input Parameters

Units/Yr

Total expected demand rate for the product over one year.

$/Order

Fixed administrative or logistical cost incurred every time an order is placed.

$/Unit/Yr

Cost to carry one unit of inventory for one full year (insurance, space, opportunity cost).

Material Note

Material properties can vary significantly based on heat treatment and manufacturer. Always consult specific supplier datasheets for critical components.

Economic Order Quantity (Q*)

707.1Units

Operational Metrics & Cost Breakdown

Note: At the theoretical optimum (EOQ), Annual Holding Cost strictly equals Annual Ordering Cost.

Orders per Year (N)

14.1

Cycle Time (Years)

0.071

Annual Holding Cost

$707.11

Annual Ordering Cost

$707.11

Total Minimum Annual Cost (TC)

$1,414.21

Governing Formula

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

Economic Order Quantity

DUnits/Year

Annual Demand Rate

SCurrency/Order

Setup / Ordering Cost

HCurrency/Unit/Year

Holding / Carrying Cost

Engineering Code

Integrate EOQ logic directly into your supply chain optimization scripts.

Python
import math

def calculate_eoq(demand_rate, setup_cost, holding_cost):
    """
    Calculate the Economic Order Quantity (EOQ) and associated costs.
    
    demand_rate: Annual demand (D) in units/year
    setup_cost: Fixed cost per order (S)
    holding_cost: Annual holding cost per unit (H)
    
    Returns:
        dict: EOQ, Number of Orders, Annual Holding Cost, 
              Annual Ordering Cost, Total Cost
    """
    
    # Input validation
    if not all(map(lambda x: x == x and abs(x) != float("inf"), 
                   [demand_rate, setup_cost, holding_cost])):
        raise ValueError("All inputs must be finite numbers.")
        
    if demand_rate <= 0 or setup_cost <= 0 or holding_cost <= 0:
        raise ValueError("All inputs must be strictly positive.")
        
    # Q* = sqrt(2DS / H)
    eoq = math.sqrt((2 * demand_rate * setup_cost) / holding_cost)
    
    num_orders = demand_rate / eoq
    annual_holding = (eoq / 2) * holding_cost
    annual_ordering = (demand_rate / eoq) * setup_cost
    total_cost = annual_holding + annual_ordering
    
    return {
        "EOQ": eoq,
        "OrdersPerYear": num_orders,
        "HoldingCost": annual_holding,
        "OrderingCost": annual_ordering,
        "TotalCost": total_cost
    }

# Example Usage
D = 10000
S = 50
H = 2

res = calculate_eoq(D, S, H)
print(f"Optimal Order Quantity (Q*): {res['EOQ']:.1f} units")
print(f"Total Annual Cost: USD {res['TotalCost']:.2f}")
MATLAB
function res = calculate_eoq(demand_rate, setup_cost, holding_cost)
    % Calculate the Economic Order Quantity (EOQ) and costs.
    % demand_rate  = Annual demand (D)
    % setup_cost   = Fixed cost per order (S)
    % holding_cost = Annual holding cost per unit (H)

    if ~isfinite(demand_rate) || ~isfinite(setup_cost) || ~isfinite(holding_cost)
        error('All inputs must be finite numbers.');
    end
    
    if demand_rate <= 0 || setup_cost <= 0 || holding_cost <= 0
        error('All inputs must be strictly positive.');
    end
    
    % Calculations
    eoq = sqrt((2 * demand_rate * setup_cost) / holding_cost);
    num_orders = demand_rate / eoq;
    annual_holding = (eoq / 2) * holding_cost;
    annual_ordering = (demand_rate / eoq) * setup_cost;
    
    res = struct(...
        'EOQ', eoq, ...
        'OrdersPerYear', num_orders, ...
        'HoldingCost', annual_holding, ...
        'OrderingCost', annual_ordering, ...
        'TotalCost', annual_holding + annual_ordering ...
    );
end

% Example Usage
D = 10000;
S = 50;
H = 2;

res = calculate_eoq(D, S, H);
fprintf('Optimal Order Quantity (Q*): %.1f units\n', res.EOQ);
fprintf('Total Annual Cost: USD %.2f\n', res.TotalCost);
Excel Formula
=SQRT((2*D_CELL*S_CELL)/H_CELL)

Technical Explanation: Economic Order Quantity (EOQ) Model

1. Technical Introduction

The Economic Order Quantity (EOQ), originally formulated by Ford W. Harris in 1913, is a fundamental deterministic inventory control model utilized in industrial engineering, supply chain optimization, and operations management. The model identifies the theoretical optimal order size or production batch size that strictly minimizes the combined annual costs of acquiring and carrying inventory. By modeling inventory depletion as a continuous, linear function, engineers use EOQ to eliminate guesswork from procurement schedules and production runs, shifting from arbitrary batch sizing to a mathematically justified cost-minimization strategy.

2. Governing Formula and Derivation

The EOQ model relies on optimizing a total cost function. The Total Annual Inventory Cost ($TC$) is the sum of the Annual Ordering Cost and the Annual Holding Cost:

TC = (D / Q) × S + (Q / 2) × H

Where:

  • Q is the order quantity (the independent variable).
  • D is the annual demand (units/year).
  • S is the fixed cost per order or production setup ($/order).
  • H is the annual holding cost per unit ($/unit/year).

To find the minimum total cost, industrial engineers apply differential calculus. By taking the first derivative of the Total Cost equation with respect to $Q$, setting it to zero ($d(TC)/dQ = 0$), and solving for $Q$, we isolate the optimum point—denoted as $Q^*$. The resulting formula is the classic EOQ equation:

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

Mathematically, this optimal point occurs exactly where the declining Ordering Cost curve intersects the rising Holding Cost curve. At the EOQ, Annual Ordering Cost equals Annual Holding Cost.

3. Input Parameters Explained

Accuracy in the EOQ calculation depends entirely on rigorous parameter estimation:

  • Annual Demand (D): This must be a steady, annualized rate. A common error is using monthly demand while keeping holding costs annualized, which severely skews the result. Units of time must remain strictly consistent across all variables.
  • Order/Setup Cost (S): For procurement, this is not the price of the goods. It is the fixed administrative and logistical cost of initiating a transaction (e.g., PO processing, receiving dock labor, freight setup). In a manufacturing context, this represents the Setup Cost—the cost of machine downtime, tool changes, and scrap generated while calibrating a machine for a new production batch.
  • Holding Cost (H): Often represented as $H = i \times C$, where $C$ is the unit cost and $i$ is the carrying cost percentage. It must include the opportunity cost of tied-up capital (WACC), warehouse space utilization, insurance, taxes, shrinkage, and obsolescence risks.

4. Engineering Interpretation and Robustness

When plotted, the Total Cost curve forms a shallow, asymmetric "U" shape. An important engineering interpretation of this geometry is that the EOQ model is remarkably robust to minor estimation errors. Because the curve is flat near the minimum, ordering 10% more or 10% less than the exact $Q^*$ will result in a nearly negligible increase in the total annual cost. This characteristic allows production planners to confidently round the calculated EOQ to standard packaging sizes (e.g., rounding an EOQ of 143 up to a standard pallet size of 150) without incurring significant financial penalties.

5. Assumptions, Limitations, and General Cases

While EOQ provides a critical theoretical baseline, it operates under highly restrictive assumptions that engineers must understand before applying it to real supply chains:

  • Deterministic and Constant Demand: The model assumes inventory depletes at a perfectly steady rate. Real-world stochastic (random) demand requires the integration of Reorder Point (ROP) and Safety Stock calculations, which EOQ does not provide.
  • Instantaneous Replenishment: It assumes the entire order quantity arrives in a single instant. In manufacturing, where a machine produces parts gradually while they are simultaneously being consumed, the Economic Production Quantity (EPQ) model is used instead.
  • Constant Pricing: Standard EOQ assumes the unit purchase price is constant regardless of order size. If a supplier offers price breaks for larger volumes, engineers must use the EOQ with Quantity Discounts model to compare the Total Cost at different price tiers.

6. Practical Application in Lean Manufacturing

In modern manufacturing, industrial engineers use the EOQ formula not just to dictate batch sizes, but to justify process improvements. By analyzing the equation, it is evident that to reduce the batch size ($Q^*$) without inflating costs, one must decrease the setup cost ($S$). This mathematical reality is the driving force behind lean manufacturing initiatives like SMED (Single-Minute Exchange of Die). By mechanically re-engineering machines to reduce setup times (lowering $S$), engineers successfully drive down the Economic Order Quantity, allowing the facility to hold less inventory ($H$) while maintaining optimal cost efficiency.

Real-World Engineering Cases

The Bulk Discount Trap

A manufacturing company bought a 3-year supply of specialized steel to secure a 10% bulk discount, completely ignoring the holding costs (warehouse space, insurance, and opportunity cost of capital). By year two, surface rust destroyed 30% of the material, and the tied-up cash caused a liquidity crisis.

Engineering Lesson

Never order purely based on unit price discounts. EOQ mathematically proves that massive orders drastically inflate holding costs. Finding the exact pivot point where ordering costs and holding costs intersect is the only way to maximize profitability.

The E-commerce Stockout Spiral

An e-commerce retailer tried to maintain a 'lean' inventory by ordering very small batches on a weekly basis to keep warehouse costs near zero. However, the fixed shipping and customs fees (Order Cost) for each tiny batch completely wiped out their profit margins, and frequent supplier delays led to massive out-of-stock periods.

Engineering Lesson

Lean manufacturing does not mean 'zero inventory.' If your setup or ordering costs are high, ordering too frequently is just as destructive as over-ordering. EOQ balances this equation perfectly.

Frequently Asked Questions

What is the Economic Order Quantity (EOQ)?

Economic Order Quantity (EOQ) is the ideal order quantity a company should purchase to minimize inventory costs such as holding costs, shortage costs, and order costs.

What are the main assumptions of the EOQ model?

The classic EOQ model assumes deterministic (constant) demand, instantaneous replenishment (zero lead time), and constant pricing with no quantity discounts.

How does holding cost affect the EOQ?

As holding costs increase, the EOQ decreases because it becomes more expensive to store inventory, incentivizing the company to order smaller quantities more frequently.