Hospital Management

Pharmacy inventory simulator

Pharmacies lose between 2% and 5% of their inventory to expiration. That is net margin evaporating.

Problem and approach

Medications expire on your shelf while others run out right when your customers need them most. You lose money on both sides.

Model the turnover of each medication category and optimize your orders to eliminate expirations without running into stockouts.

Variables it will analyze

  • Inventory by category
  • Monthly turnover
  • Average shelf life
  • Order lead time

Frequently asked questions

How does the simulator handle medications with different shelf lives?
You can segment by shelf life and the simulator models each group with its own turnover curve, flagging items at risk of expiring.
Can I simulate seasonal demand for medication?
Yes, you can model seasonal peaks such as flu medicine in winter or allergy medication in spring to adjust your orders ahead of time.
Does the simulator handle fast- vs slow-moving items?
Yes, you can classify inventory into A, B, and C categories by turnover and optimize the replenishment strategy for each group.

Complete guide

Pharmacy turnover simulator: from expiry write-off to demand-driven inventory

In community pharmacies and hospital pharmacy chains across the US, UK and Canada — CVS, Walgreens, Rite Aid, Walmart Pharmacy, Boots UK, Shoppers Drug Mart, independents under NCPA, hospital pharmacies under ASHP — drug turnover defines net margin directly. A community pharmacy running 2-5% expiry write-off per month operates with no cushion against demand volatility, no leverage to negotiate with the wholesaler, and no ability to absorb a drop in average script value without closing.

A serious simulator solves three operational equations on one screen:

Annual drug turnover = Cost of goods sold / Average inventory at cost Days on Hand = 365 / Drug turnover Expiry write-off = Expired product value / COGS

Worked example — independent community pharmacy with 4,200 SKUs

Independent pharmacy in the suburban Midwest with average inventory at cost of $280K, annual COGS of $1.68M. Turnover = 1.68M / 0.28M = 6.0× per year. Days on Hand = 365 / 6.0 = 60.8 days. If $62K expires annually, write-off = 62/1,680 = 3.7%. NCPA Digest benchmarks for community pharmacy: turnover 8-12×, Days on Hand 30-45, expiry write-off below 2%. Diagnosis is direct: overbuying out of fear of stockout, paid for with margin.

ABC/XYZ classification and controlled substances

ABC segmentation by value (A = 20% of SKUs representing 80% of sales) combined with XYZ by demand variability (X regular, Y moderate, Z sporadic) defines four replenishment policies. AX (high value, stable demand) demand low safety stock and frequent replenishment with short lead time; CZ (low value, erratic demand) tolerate higher safety stock and slower replenishment. Without this matrix, the pharmacy lands in the classic pattern: overstocks of pediatric syrups and simultaneous stockouts of critical antihypertensives in the same month.

Controlled substances are a category of their own: Schedule II-V per DEA in the US, Schedule 1-5 in Canada, CD POM in UK. DEA CFR 21 §1304 mandates perpetual inventory count with biennial audit and DEA Form 222 for Schedule II transfers; FDA Drug Supply Chain Security Act (DSCSA) adds full-track-and-trace through November 2023. A simulator integrates these categories under a stricter replenishment policy and alerts when the physical count of a controlled drug deviates ±5% from the perpetual kardex.

Cold chain: the biologics challenge

Vaccines, insulins, monoclonals, biosimilars and blood products require cold chain storage at 2-8°C with documented excursions beyond 15-30 minutes voiding the batch. A pharmacy with five refrigerators not continuously temperature-monitored is one three-hour outage away from losing inventory equal to two months of margin. The simulator lets you build cold-chain cost into the SKU COGS and evaluate real profitability of the biologics line — which often operates at a hidden loss.

Seasonal demand — flu, allergy, back-to-school pediatric

Demand for cough-cold products, antipyretics and antihistamines moves on documented seasonality. In temperate US, flu-season OTC peaks November-March; antihistamines peak April-June with pollen; pediatric category doubles in late August back-to-school. A simulator that projects SKU demand incorporating 24-36 months of seasonal history — not just a 3-month moving average — buys inventory 6-10 weeks ahead and negotiates better volume pricing with AmerisourceBergen, Cardinal Health, McKesson or the regional wholesaler.

Reimbursement pressure and generic substitution

Pharmacy reimbursement in the US is increasingly squeezed by PBM pressure (CVS Caremark, Express Scripts, OptumRx) with Maximum Allowable Cost (MAC) lists that frequently sit below acquisition cost on generic fills. The 2024 NCPA survey reports 82% of independent pharmacies had at least one underwater generic fill per week. Generic substitution now captures 92% of US scripts per AAM Generic Access & Savings Report 2024. In that regulated, price-compressed environment, the only lever still fully intact for the pharmacy is inventory rotation and working-capital management, since per-unit margin is set by the PBM contract.

GS1 DataMatrix serialization and lot traceability

Serialization (unique code per pack via GS1 DataMatrix) has been mandatory in the EU since 2019 (FMD) and in the US since November 2023 (DSCSA full track-and-trace). For the pharmacy, serialization means receipt and dispensing require DataMatrix scan with verification against the national database. The simulator integrates with this flow by predicting when a near-expiry lot must trigger a cross-alert against the GS1 base — instead of waiting for the weekly manual shelf review.

FEFO discipline: the mandatory rotation standard

FEFO (First-Expire-First-Out) is not optional in pharmacy — it is the foundational rotation discipline. Unlike FIFO (which rotates by receipt date), FEFO rotates by expiry date. Medications received on the same date can have different expiry dates depending on lot. FEFO requires lot-level tracking and physical placement discipline: near-expiry lots on the front of shelves, later-expiry lots behind.

Systems that enforce FEFO at dispensing: QS/1 with expiry-date lot tracking, PioneerRx expiry alerts, McKesson Pharmacy Management with DSCSA serialization. Manual pharmacies without these systems report expiry write-offs 2-4× higher than those with automated FEFO enforcement. The most common failure: a tech manually picking from the back of the shelf (the freshest lot) because it's easier, bypassing the expiry discipline entirely.

For controlled substances, DEA CFR 21 mandates not only FEFO but also lot-level chain-of-custody documentation — every lot must be traceable from receipt through dispense or return.

Mexico: COFEPRIS and the regulated pharmacy environment

In Mexico, pharmacy inventory is governed by COFEPRIS (Comisión Federal para la Protección contra Riesgos Sanitarios), which classifies medications into: Grupo I (OTC), Grupo II (prescription-required, non-controlled), Grupo III-V (controlled substances requiring tarjetón amarillo — a special controlled-substance prescription). COFEPRIS requires:

  • Physical inventory count of controlled substances at least quarterly with documentary reconciliation.
  • Cold chain documentation for biologics and insulins (2-8°C, maximum 30-minute excursion).
  • Spanish-language labeling verification at receipt.
  • Returns and destruction records for expired medications.

Farmacias de la Comunidad (independents) and regional chains (Farmacias del Ahorro, Benavides/Farmacias Roma, Farmacias Guadalajara) operate under the same framework. The turnover benchmark in Mexico for well-run community pharmacies: 10-14× annually, with expiry write-off under 1.5% of COGS — achievable with weekly ROP review cycles and FEFO discipline.

Spain: farmacia reglamentada and generic substitution

Spanish pharmacies operate under a tightly regulated model: farmacia comunitaria (one per town, protected by geographic exclusivity in small municipalities), farmacia de guardia (24-hour duty pharmacy), and hospital pharmacy. The Sistema Nacional de Salud (SNS) mandates sustitución de medicamentos (generic substitution): if a branded medication is prescribed, the pharmacist must offer the generic equivalent if available and cheaper. In 2024, generic penetration reached 45% of dispensed units in Spain.

SNS reimbursement operates via the Nomenclátor de Facturación — a published list of reimbursable medications with fixed PVP (Precio de Venta al Público). The margin is fixed: approximately 27.9% on the PVP up to EUR 91.63, with a lower percentage on higher-priced medications. In this margin-compressed environment, inventory efficiency (turnover, expiry control, dead stock elimination) is the primary remaining lever for pharmacist-owner profitability.

Spain's pharmacy technology landscape: BOT PLUS (Consejo General de Farmacéuticos), Nixfarma, Farmatic, and Farmasyst are the dominant management systems with FEFO, lot tracking, and SNS billing integration.

Differentiation from the POS inventory module

The pharmacy POS (QS/1, PioneerRx, Rx30, Liberty, Computer-Rx) reports current stock and period sales. It does not project demand under three scenarios, does not cross expiry with turnover by purchase cohort, does not differentiate controlled from OTC in alerts, and does not translate '18 days of overstock' into dollars of tied-up capital with cost-of-capital. The simulator closes that gap and produces the weekly order to the wholesaler with per-SKU optimal quantities and an auditable reason for each decision.

For the pharmacist-owner, the branch manager and the regional chain director, the tool translates daily counter operations into profitability metrics that the accountant, the owner and the bank understand — and that a specialized consultancy would charge tens of thousands of dollars to diagnose one-time.

Illustrative case

Composite case for instructional purposes: combines sector dynamics with realistic figures. Names are fictional and do not represent a specific company.

Greenleaf Community Pharmacy, a three-location independent in the Pacific Northwest billing $4.4M annually and serving commercial, Medicare Part D and Medicaid scripts, closed 2024 with average inventory of $820K and expiry write-off of $32K — 3.9% of COGS, nearly double the NCPA Digest benchmark. The pharmacist-owner noticed operating margin had slid from 14% to 10.5% over three years without a visible drop in script volume.

Running the simulator on 18 months of POS data surfaced: 412 SKUs classified C-Z with inventory equal to 95 days of demand, mostly pediatric seasonal syrups bought on the wholesaler's annual campaign and antihistamines bought in combo. Eight biologic SKUs (insulins) turning 3× per year but ordered as if they turned 6×, forcing quarterly batch disposals. And 68 Schedule IV antibiotic SKUs bought on discount without demand analysis, with 41% expired that year.

90-day action plan: (1) differentiated policy per ABC/XYZ cell with weekly replenishment only for AX/AY, biweekly for BX/BY and on-demand monthly for CZ; (2) renegotiated the biologics line with AmerisourceBergen for monthly orders with 48h lead time instead of quarterly; (3) blocked discount-driven purchasing on controlled substances without 12-month demand history review.

Six months later: average inventory fell to $565K (31% reduction), turnover rose from 4.5× to 7.8× annually, expiry write-off closed the half at 1.6% of COGS, operating margin climbed back to 13.2%. The $255K of freed working capital funded the buildout of a fourth location. Total cost of the exercise: 40 hours of the owner-pharmacist using the simulator over two weekends, versus the $35K quote from a retail pharmacy consultancy for the same diagnosis.

From theory to calculation

When you need more than a quick calculation, our advanced simulators model full scenarios with your data.

See advanced simulators

Sector reference ranges

Indicative ranges based on public sector literature and operational observation. Your business may differ — use the numbers as a starting point, not as a target.

MetricValueSource
Drug turnover — community pharmacy8-14 times/yearNCPA Digest 2024
Optimal days on hand25-45 daysAPhA Pharmacy Operations Benchmark 2023
Acceptable expiry write-off<1% of inventoryNACDS Chain Pharmacy Report 2024
Allowable cold-chain temperature deviation2-8°C (max excursion 30 min)WHO Model Guidance for Storage 2020
Target prescription fill rate>=97%APhA Professional Practice Standards

Frequently asked questions

1How do you calculate inventory turnover in a pharmacy?
Turnover = Annual COGS / Average inventory at cost. Example: $1.68M COGS and $280K average inventory → 6.0× per year. NCPA Digest sets 8-12× as the healthy range for community pharmacy; below 6× indicates overstock and tied-up capital; above 15× usually signals frequent stockouts hurting script capture.
2What is an acceptable expiry rate in a pharmacy?
Under 2% of COGS per NCPA Digest and NACDS Chain Pharmacy Report. Above 3% signals a structural buying problem: no ABC/XYZ classification, discount-driven purchasing without analysis, or weak first-expire-first-out (FEFO) discipline. Best-in-class operators close at 0.5-1% with active FEFO and 45/90-day expiry alerts.
3How do I prevent medication expiry?
Highest-evidence levers: strict FEFO picking, automated alerts at 90 and 45 days to expiry, ABC/XYZ classification with differentiated purchasing policy, negotiated return-to-wholesaler at 75-80% of shelf life, inter-store transfers for at-risk inventory, and controlled liquidation 30 days before expiry with targeted discount.
4What are controlled substances in pharmacy inventory?
Medications under special regulation: narcotics, psychotropics, reserve antibiotics. In the US, DEA Schedule II-V per CFR 21; in Canada Schedule 1-5; in UK Controlled Drugs POM categories. They require perpetual inventory with biennial DEA audit, DEA Form 222 for Schedule II transfers, dual-signature kardex and documented chain-of-custody from receipt through dispensing.
5What is cold chain for medications?
Cold chain is the protocol to keep temperature-sensitive drugs (vaccines, insulins, monoclonals, blood products) between 2 and 8°C with continuous monitoring and documented excursions. A sustained deviation out of range can void the batch per WHO guidance. Requires validated refrigerators, dataloggers with alarm and a documented contingency plan for power loss.
6How do I classify pharmacy inventory by turnover?
ABC by value (A = 20% of SKUs representing ~80% of sales, B next 30% contributing ~15%, C remaining 50% contributing 5%) combined with XYZ by demand variability (X regular, Y moderate, Z sporadic). The nine resulting cells define differentiated replenishment policies: AX demands frequent low-stock replenishment; CZ tolerates generous stock and slow replenishment.
7How do I forecast seasonal demand in a pharmacy?
Use at least 24 months of SKU history decomposed into trend + seasonality + noise (Holt-Winters or STL decomposition). Cold/flu products peak November-March; antihistamines April-June during pollen; pediatric category doubles late August for back-to-school. Project 8-10 weeks ahead to lock volume pricing with the wholesaler.

Tools from the same topical cluster. Use them together to close the loop on your analysis.

Last updated: April 30, 2026 · Reviewed by the Simúlalo editorial team. Figures and benchmarks are indicative; verify with your own data before deciding.

View methodology