Pharmacy Beyond-Use Dating: Software Mistakes
Beyond-use dates for compounded preparations are not expiry dates. USP 795/797 requirements in plain English, and why your PMS probably conflates the two.
The cream that expires three times
A pharmacist in California compounded a cream with two ingredients. One -- a corticosteroid -- has a manufacturer expiry date 6 months from now. The other -- a moisturizing base -- expires in 2 years. The beyond-use date for the compounded cream? Neither. It is 180 days from the date of compounding, per USP 795 guidelines for non-sterile compounded preparations containing water. Not 6 months from now, not 2 years from now, not the earlier of the two ingredient expiry dates. 180 days from the moment those two ingredients were mixed together in the pharmacy.
This distinction -- between a manufacturer's expiry date and a compounding beyond-use date -- is the source of more pharmacy compliance failures than almost any other single issue. It is also the thing that most pharmacy inventory software handles poorly, handles incorrectly, or does not handle at all.
The pharmacist's software tracked the corticosteroid's manufacturer expiry (6 months out) and the base's manufacturer expiry (2 years out). When she compounded the cream, she manually calculated the 180-day beyond-use date and wrote it on the label. The software had no field for it. As far as the software was concerned, the cream did not exist as a separate trackable entity. It knew about the ingredients. It did not know about the product.
This is not an edge case. The majority of pharmacy management systems in the United States were designed for dispensing commercially manufactured products. They track NDC numbers, lot numbers, and manufacturer expiry dates. They were not designed for compounding, where the pharmacy itself becomes the manufacturer and the product it creates has a shelf life that is calculated, not printed on a box.
Not sure how much you're losing to expiry?
Run a free inventory waste audit — find your bleeding SKUs in 60 seconds. No sign-up required.
Run free auditThe difference between expiry and beyond-use, in plain terms
A manufacturer's expiry date is determined by the manufacturer through stability testing. When Pfizer stamps "EXP 03/2027" on a bottle of atorvastatin, that date is backed by accelerated stability studies, real-time stability data, and an FDA-approved protocol. The manufacturer is saying: we tested this product under controlled conditions and it maintains its potency, purity, and safety through this date when stored as directed.
A beyond-use date (BUD) is determined by the pharmacy based on guidelines from USP (United States Pharmacopeia) chapters 795 and 797. The pharmacy is saying: based on the type of preparation we made, the ingredients we used, the conditions we're storing it in, and the applicable USP chapter, this product should be used by this date. The pharmacy has not conducted stability testing. It is relying on category-based rules that USP established through literature review and expert consensus.
These are fundamentally different kinds of dates. They are generated by different entities, governed by different standards, and require different tracking logic. Treating them as interchangeable -- which is what happens when a software system has one "expiry date" field and nothing else -- creates compliance gaps that are invisible until an auditor or a state board inspector starts asking questions.
USP 795: The non-sterile rules
USP 795 governs non-sterile compounded preparations -- creams, ointments, capsules, oral suspensions, troches, suppositories, and the like. The beyond-use dating rules under the 2022 revision (which became enforceable November 2023) are more specific than the previous version, and most pharmacy software has not been updated to reflect them.
The framework assigns BUDs based on preparation type and whether the pharmacy has supporting stability data:
Without stability-indicating studies: For non-aqueous formulations (ointments, creams without water, powder-filled capsules), the BUD is 180 days or the earliest ingredient expiry date, whichever is shorter. For aqueous formulations (solutions, suspensions, creams containing water), the BUD is also 180 days or the earliest ingredient expiry date, whichever is shorter -- but only if the preparation contains a preservative system. Without a preservative, the aqueous BUD drops to 35 days.
With stability-indicating studies: If the pharmacy has conducted or obtained stability data for a specific formulation, the BUD can be extended up to the duration supported by that data. This is rare in practice. Stability testing costs $3,000-8,000 per formulation and takes 3-12 months depending on the study design. Most community pharmacies do not pursue it. Large compounding pharmacies and outsourcing facilities sometimes do, particularly for high-volume formulations where the extended dating justifies the testing investment.
The practical implication: a pharmacy that compounds a hydrocortisone 2% cream in an aqueous base with preservative can assign a 180-day BUD. The same pharmacy compounding the same cream without preservative must assign a 35-day BUD. The difference in clinical utility and economic viability is enormous -- a 35-day BUD means the patient needs a refill every month, the pharmacy needs to compound more frequently, and the risk of waste (patient does not finish the product before BUD) is much higher.
Most pharmacy software does not capture the distinction between preserved and unpreserved aqueous formulations. It has a compounding module (if it has one at all) that lets the pharmacist enter a BUD manually, but it does not enforce or suggest BUDs based on formulation characteristics. The pharmacist is expected to know the rules, calculate the date, and enter it correctly every time.
USP 797: The sterile rules, which are stricter and more consequential
USP 797 governs sterile compounded preparations -- IV admixtures, ophthalmic solutions, injections, irrigation solutions. The stakes are higher because a contaminated sterile product can cause sepsis, blindness, or death. The beyond-use dating rules reflect this.
Under the 2023 revision of USP 797 (enforcement of which has been delayed and is, as of this writing, the subject of ongoing legal challenges, but which many state boards are already applying), BUDs for sterile preparations depend on the compounding conditions:
Category 1 (compounded in a segregated compounding area, not a classified cleanroom): BUD is 12 hours at room temperature or 24 hours refrigerated. This is extremely tight. A hospital pharmacy compounding an IV antibiotic bag in a segregated area has less than a day before that bag must be used or discarded.
Category 2 (compounded in an ISO-classified cleanroom with appropriate environmental monitoring): BUDs range from 4 days (room temperature, without preservative) to 45 days (refrigerated, with preservative). Frozen storage can extend BUDs further, up to 60 days in some cases.
The jump from Category 1 to Category 2 is significant: 12 hours versus up to 45 days. This is why hospitals and compounding pharmacies invest $200,000-500,000 in cleanroom construction and $40,000-80,000/year in environmental monitoring. The infrastructure pays for itself by enabling longer BUDs, which enable batch compounding, which reduces per-unit labor cost and waste.
But the tracking challenge intensifies with Category 2. A hospital pharmacy compounding 50 sterile preparations per day with varying BUDs (some 4 days, some 10, some 45, depending on the formulation, storage conditions, and whether the preparation contains a preservative) needs a system that tracks each batch individually. The BUD is not a property of the drug -- it is a property of the specific batch, determined by how it was made, where it was made, and how it is stored. Move a refrigerated preparation to room temperature and the BUD changes. The same physical product now has a different shelf life based on its storage history.
What pharmacy software typically gets wrong
Having spoken with pharmacists at independent pharmacies, small hospital systems, and compounding-focused operations, the gaps in existing software fall into consistent patterns.
Gap 1: One date field. The most common issue. The system has a single "expiry date" field that is used for both manufacturer expiry dates on commercial products and beyond-use dates on compounded preparations. This means reporting cannot distinguish between the two. A report showing "products expiring this month" mixes 90-count bottles of lisinopril (manufacturer expiry, replace from wholesaler) with compounded progesterone capsules (beyond-use date, discard or recompound). These are different events requiring different actions, but they show up in the same list with the same urgency level.
Gap 2: No batch-level tracking for compounded products. Commercial products are tracked by NDC and lot number. Compounded products need to be tracked by batch -- a specific preparation made on a specific date with specific ingredients from specific lots. Most pharmacy software creates a compounding record when the pharmacist logs a formulation, but does not carry that record forward into inventory as a trackable, depletable, expirable entity. The compounding log says "we made 500ml of Drug X on January 15." The inventory system does not know that 200ml of Drug X is sitting on the shelf with a BUD of July 14. These are two separate systems with no connection between them.
Gap 3: No storage-condition sensitivity. As noted above, USP 797 BUDs change based on storage conditions. A preparation with a 45-day BUD under refrigeration has a 4-day BUD at room temperature. If a batch is moved from the fridge to a dispensing area (room temperature), the BUD should update. No pharmacy software we have encountered does this automatically. The pharmacist must manually recalculate and relabel, which is the kind of manual process that gets skipped at 2 AM during a busy hospital shift.
Gap 4: No ingredient-lot traceability. When a compounded product is made from three ingredients, and one of those ingredients is later recalled, the pharmacy needs to identify every batch of every compounded product that used that ingredient lot. This requires a chain: commercial ingredient (NDC, lot, expiry) linked to compounding batch (formulation, date, BUD) linked to dispensing record (patient, date, quantity). Most systems capture the first link and the last link but not the middle one.
Gap 5: No USP rule engine. The BUD calculation under USP 795 and 797 follows a decision tree: Is the preparation sterile or non-sterile? Aqueous or non-aqueous? Preserved or unpreserved? What are the compounding conditions? What is the storage temperature? A software system that encoded this decision tree could suggest a BUD based on formulation characteristics and compounding conditions, flagging any pharmacist-entered BUD that exceeds USP limits. Instead, the pharmacist calculates the BUD mentally or using a reference chart, enters it into a free-text field, and the system accepts whatever they type without validation.
The compliance risk, quantified
State boards of pharmacy are increasingly auditing compounding records as part of routine inspections. The consequences of BUD non-compliance range from citations (typically $500-2,000 per violation in most states) to license suspension (rare, but it happens -- California suspended a pharmacy license in 2021 partly over BUD documentation failures) to FDA enforcement action for outsourcing facilities.
The documentation burden is not trivial. For each compounded batch, USP requires the pharmacy to maintain records including: master formulation record, compounding record (including ingredient lot numbers, quantities, and expiry dates), assigned BUD with rationale, quality control checks, and storage conditions. A pharmacy compounding 20 preparations per day generates over 7,000 batch records per year, each of which must be retainable and retrievable for inspection.
When these records are partially in the software, partially in paper logs, and partially in the pharmacist's memory, audits become painful. The most common finding in board inspections is not that the pharmacy assigned the wrong BUD. It is that the pharmacy cannot demonstrate how it determined the BUD it assigned. The calculation was correct but undocumented, which from a regulatory perspective is indistinguishable from the calculation being wrong.
A pharmacy that compounds 20 preparations per day at an average ingredient cost of $18 per preparation has $131,400/year in compounded inventory flowing through the system. If 5% of that inventory is wasted because BUDs were calculated more conservatively than necessary (the pharmacist defaulted to the shortest possible BUD because they were unsure which rule applied), the annual cost of conservative over-discarding is $6,570. If 2% of batches are dispensed past their actual BUD because the tracking system did not flag them, the compliance exposure is $2,628 in product cost plus the citation risk plus the liability risk of a patient receiving an out-of-date compounded medication.
Neither number is large enough to bankrupt a pharmacy. But combined -- $9,198/year in avoidable cost, plus regulatory risk, plus the pharmacist's time spent on manual calculations and documentation that software should be handling -- the total burden is meaningful for a business with typical net margins of 2-5% on compounded preparations.
The two-date problem in practice
Here is what correct tracking looks like for a pharmacy that dispenses both commercial and compounded products.
For a commercial product (say, amoxicillin 500mg capsules, NDC 12345-6789-01, lot ABC123, manufacturer expiry 09/2027): the system tracks the NDC, lot, and manufacturer expiry. When the product approaches expiry, the system alerts the pharmacist to return it to the wholesaler for credit (most wholesalers accept returns up to 6 months before and 12 months after manufacturer expiry through reverse distribution) or to move it to the front of the shelf for first-expiry-first-out dispensing. The economic question is simple: can we dispense it before it expires, and if not, can we return it for credit?
For a compounded product (say, progesterone 200mg capsules, compounded in-house on 02/15, batch CP-2026-0215-A, beyond-use date 08/14 per USP 795 non-aqueous formulation rule): the system tracks the batch number, compounding date, BUD, ingredient lots, formulation reference, and remaining quantity. The BUD is the hard stop -- there is no wholesaler to return to, no credit to recover. When the BUD passes, the remaining product is waste, full stop. The economic question is different: did we compound the right quantity for the demand, and did we dispense it before the BUD?
These two tracking workflows share a surface similarity (both involve dates, both require first-expiry-first-out rotation) but differ in every operational detail. The date source is different (manufacturer vs. pharmacist calculation). The date flexibility is different (manufacturer expiry is fixed; BUD can be extended if stability data is obtained). The disposal economics are different (commercial products can often be returned for 50-100% credit; compounded products are a total loss). The documentation requirements are different (commercial products need lot-level tracking; compounded products need batch-level records including ingredient sources, quantities, and environmental conditions).
A system that collapses these into a single workflow necessarily handles one of them badly. In practice, it is always the compounded product workflow that suffers, because the software was designed for commercial products and compounding was bolted on later.
What a pharmacist actually needs
The pharmacists we have spoken with describe a fairly consistent wish list, none of which requires exotic technology:
Separate fields for manufacturer expiry and compounding BUD, with clear labelling so reports can filter by type. Batch-level tracking for compounded products that links to the compounding record and depletes as doses are dispensed. A BUD calculator that applies USP 795/797 rules based on formulation characteristics the pharmacist enters (sterile/non-sterile, aqueous/non-aqueous, preserved/unpreserved, storage conditions) and flags when a manually entered BUD exceeds the calculated maximum. Ingredient-lot traceability that connects commercial ingredient lots to compounding batches to dispensing records. And reporting that separates "commercial products approaching manufacturer expiry" from "compounded products approaching BUD" because the actions required are different.
None of this is technically difficult. It is, however, specifically difficult -- it requires someone to understand pharmacy compounding operations well enough to build the right data model, rather than treating compounded products as a special case of commercial products. They are not a special case. They are a different category of product with different regulatory requirements, different economic characteristics, and different operational workflows.
The cost of getting it right versus getting it wrong
A pharmacy that invests in proper BUD tracking -- whether through software, through disciplined manual processes, or through some combination -- typically sees three measurable outcomes.
First, waste from conservative over-discarding drops. When the pharmacist can see clearly that a non-aqueous compounded preparation qualifies for a 180-day BUD rather than defaulting to 90 days out of caution, the preparation has twice as long to be dispensed. For a pharmacy compounding 8-12 preparations per day, this reduces annual waste by $3,000-6,000.
Second, audit preparation time drops from days to hours. Instead of assembling paper records, cross-referencing compounding logs with dispensing records, and reconstructing BUD rationales from memory, the pharmacist generates a report. Board inspections become routine rather than stressful. The time savings is 20-40 hours per year for an annual inspection, valued at $1,200-3,200 at pharmacist hourly rates of $60-80.
Third, the pharmacy can identify formulations where stability testing would be economically justified. If the data shows that the pharmacy compounds 500 units per year of a specific formulation and discards 12% because the 180-day BUD is too short relative to demand patterns, the $5,000 cost of stability testing (which might yield a 365-day BUD) pays for itself within one year through reduced waste.
These numbers are not transformative individually. Combined, they represent $8,000-15,000/year in recovered value for a mid-size compounding pharmacy. For a business with $400,000-600,000 in annual compounding revenue and 3-5% net margins, that is a 15-25% improvement in compounding profitability. Not from compounding more. Not from charging more. From wasting less and documenting better.
ShelfLifePro tracks both manufacturer expiry dates and compounding beyond-use dates as separate fields, so nothing falls through the cracks. Free plan at shelflifepro.net.
See what batch-level tracking actually looks like
ShelfLifePro tracks expiry by batch, automates FEFO rotation, and sends markdown alerts before stock expires. 14-day free trial, no credit card required.