# Economic Order Quantity (EOQ) Calculator

> Computes the economic order quantity that minimises the sum of annual ordering and holding costs (Harris–Wilson formula √(2DS/H)), plus orders per year, days between orders and the resulting annual costs.

- Calculator id: `eoq` · Category: Business & Marketing (`business`) · Tool name: `calculate_economic_order_quantity`
- Canonical page: https://tttkmbb.com/business/eoq · This document: https://tttkmbb.com/business/eoq.md · JSON definition: https://tttkmbb.com/business/eoq.json

## Purpose

Computes the economic order quantity that minimises the sum of annual ordering and holding costs (Harris–Wilson formula √(2DS/H)), plus orders per year, days between orders and the resulting annual costs.

**Use when:** You reorder a product with steady demand and want the order size that balances ordering cost against holding cost.

**Do not use when:** Demand is highly variable or seasonal, quantity discounts apply, or the item is produced in-house at a finite rate (use the economic production quantity model); for when to order, use reorder-point.

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `annual_demand_units` | number | units/year | required | Units sold or used per year (D). (> 0, max 1000000000000) |
| `ordering_cost_per_order` | number |  | required | Fixed cost of placing one order: paperwork, shipping, setup (S). (> 0, max 1000000000) |
| `holding_cost_per_unit_per_year` | number |  | required | Cost of keeping one unit in stock for a year: storage, capital, insurance, obsolescence (H). (> 0, max 1000000000) |
| `unit_cost` | number |  | optional | Optional purchase price per unit, to report total annual cost including purchases. (min 0, max 1000000000) |
| `working_days_per_year` | integer | days | optional, default 365 | Days used to convert orders per year into days between orders. (min 1, max 366) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `eoq_units` | number | units | √(2 × D × S / H). |
| `orders_per_year` | number |  | D / EOQ. |
| `days_between_orders` | number | days | working_days_per_year / orders_per_year. |
| `annual_ordering_cost` | number |  | (D / EOQ) × S. |
| `annual_holding_cost` | number |  | (EOQ / 2) × H (average inventory is half the order size). |
| `total_annual_inventory_cost` | number |  | Minimum combined cost; at the EOQ the two components are equal. |
| `total_annual_cost_including_purchase` | number |  | D × unit_cost + ordering + holding (only when unit_cost given). |

## Formula

`EOQ = √(2 × annual_demand × ordering_cost / holding_cost); orders_per_year = D / EOQ; ordering_cost = D / EOQ × S; holding_cost = EOQ / 2 × H; total = ordering + holding (+ D × unit_cost)`

Classic Harris (1913) / Wilson EOQ model: constant demand, instantaneous replenishment, no stockouts and no quantity discounts. The total cost curve is flat near the optimum, so rounding the EOQ to a practical pack size changes cost very little.

## Data Sources

- Harris FW (1913, reprinted 1990) How Many Parts to Make at Once, Operations Research 38(6):947-950 — https://pubsonline.informs.org/doi/10.1287/opre.38.6.947 (peer_reviewed, retrieved 2026-09-24)
- Wikipedia – Economic order quantity — https://en.wikipedia.org/wiki/Economic_order_quantity (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/eoq?annual_demand_units=…&ordering_cost_per_order=…&holding_cost_per_unit_per_year=…`
- `POST https://tttkmbb.com/api/v1/calculate/eoq` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/eoq · OpenAPI operationId `calculate_economic_order_quantity` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "eoq", "inputs": {…}}`

## Example

- D = 1,000, S = 10, H = 0.50: inputs `{"annual_demand_units":1000,"ordering_cost_per_order":10,"holding_cost_per_unit_per_year":0.5}` → `{"eoq_units":200,"orders_per_year":5,"days_between_orders":73,"annual_ordering_cost":50,"annual_holding_cost":50,"total_annual_inventory_cost":100}`
- D = 12,000, S = 50, H = 2.40, unit cost 8: inputs `{"annual_demand_units":12000,"ordering_cost_per_order":50,"holding_cost_per_unit_per_year":2.4,"unit_cost":8}` → `{"eoq_units":707.11,"orders_per_year":16.97,"days_between_orders":21.5,"annual_ordering_cost":848.53,"annual_holding_cost":848.53,"total_annual_inventory_cost":1697.06,"total_annual_cost_including_purchase":97697.06}`

```
GET https://tttkmbb.com/api/v1/calculate/eoq?annual_demand_units=1000&ordering_cost_per_order=10&holding_cost_per_unit_per_year=0.5
```

## Limitations

Demand is highly variable or seasonal, quantity discounts apply, or the item is produced in-house at a finite rate (use the economic production quantity model); for when to order, use reorder-point. Classic Harris (1913) / Wilson EOQ model: constant demand, instantaneous replenishment, no stockouts and no quantity discounts. The total cost curve is flat near the optimum, so rounding the EOQ to a practical pack size changes cost very little. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**How do I estimate the holding cost?**

Commonly 20–30 % of the unit cost per year (capital cost, storage, insurance, shrinkage, obsolescence). Enter it as a currency amount per unit per year.

**Why are ordering and holding costs equal at the EOQ?**

That is the optimality condition of the model: total cost D·S/Q + Q·H/2 is minimised where its two terms cross, at Q = √(2DS/H).

## Related

- [Reorder Point Calculator](https://tttkmbb.com/business/reorder-point.md) — When to place the order given lead time and safety stock.
- [Break-Even Calculator](https://tttkmbb.com/finance/break-even.md) — Fixed versus variable cost trade-off in production.
