Expiration Date Calculator

Expiration date calculator that turns a production date plus a shelf life (in days, weeks, months or years) into the exact expiry date with weekday, days remaining, and percentage of shelf life elapsed.

Time & Date 4 time units Days remaining
Rate this calculator · 5.0 (2)

Expiration Date Calculator

Production date + shelf life → expiry date

Instructions — Expiration Date Calculator

1

Pick the production date

Enter the date the food, medicine or product was made. Use the date on the package labelled “Manufactured,” “Packed on,” or “Production date.” The expiration date calculator defaults to today.

2

Enter the shelf life

Type a number and choose the unit: days, weeks, months or years. Quick picks load 7 d, 30 d, 3 m, 6 m, 1 y, and 2 y — the most common food-and-cosmetic shelf lives.

3

Read the expiration date

The expiration date calculator shows the calendar date plus weekday, status (expired / use soon / fresh), days remaining from today, and percentage of shelf life elapsed.

Best before vs use by: “Best before” is a quality date — safe to eat after, may taste worse. “Use by” is a safety date — the FDA, USDA and EU food safety agencies say do not consume after that date.
Months math: when shelf life is given in months, the expiration date calculator adds calendar months (not 30-day blocks). 3 months from Jan 31 lands on Apr 30, not May 1 or May 2.

Formulas

Three relationships matter: the expiration date itself, days remaining from today, and percent of shelf life elapsed. The expiration date calculator computes all three with calendar-aware date math.

Expiration date
$$ D_{exp} = D_{prod} + \text{shelf life} $$
Direct addition. For day and week units it is straightforward arithmetic. For month and year units the calculator uses calendar months (preserves day-of-month where possible).
Days remaining
$$ \text{days remaining} = D_{exp} - D_{today} $$
Positive means still fresh; zero means expires today; negative means already expired (and shows the days past). The expiration date calculator highlights the status colour-coded.
Percent elapsed
$$ \% = \frac{D_{today} - D_{prod}}{D_{exp} - D_{prod}} \times 100 $$
Tracks how far through the shelf life the product is. At 100% the expiration date has arrived; below 50% the item is in its first half.
Day-unit conversion
$$ 1\,\text{wk} = 7\,\text{d};\;\; 1\,\text{mo} \approx 30.44\,\text{d};\;\; 1\,\text{yr} = 365.25\,\text{d} $$
These averages are useful for back-of-envelope checks. The expiration date calculator uses real calendar arithmetic, not these averages, so a 6-month shelf life lands on the correct calendar day.
Month edge case (Jan 31 + 1 mo)
$$ \text{Jan 31} + 1\,\text{mo} = \text{Feb 28 or 29} $$
When the target month is shorter than the source month, the expiration date is set to the last day of the target month. February 28 (or 29 in a leap year) becomes the answer.
Leap-year handling
$$ \text{Feb 29, 2024} + 1\,\text{yr} = \text{Feb 28, 2025} $$
A Feb 29 production date with a year-unit shelf life lands on Feb 28 in non-leap years. The expiration date calculator follows the same rule that JavaScript’s Date object uses internally.

Reference

Typical shelf life of common products
ProductShelf life (unopened)Storage
Fresh milk (pasteurised)7–10 daysFridge 4°C
UHT milk6–9 monthsPantry, then fridge after opening
Eggs (refrigerated)28–35 daysFridge 4°C
Yogurt14–21 daysFridge
Hard cheese6–12 monthsFridge, sealed
Wheat flour6–8 monthsPantry, dry
Dried pasta2 yearsPantry
Canned vegetables2–5 yearsPantry
Canned meat / fish2–5 yearsPantry
HoneyIndefinitePantry, sealed
Vegetable oil12–24 monthsCool, dark
OTC medicine2–5 yearsPer label
Cosmetic cream (sealed)24–36 monthsCool, dark

Expiration date label types you may see

Different products use different label vocabulary. Knowing the difference prevents food waste and protects safety.

Food labels
LabelMeaning
Best beforeQuality, not safety
Use bySafety deadline (FDA)
Sell byFor the retailer
Best if used byQuality, USDA term
Freeze byFreeze before this date
Medicine / cosmetic
LabelMeaning
EXP / ExpiryLast day of safe potency
Discard afterHard deadline
PAO 12M12 months after opening
PAO 6M6 months after opening
Batch / LotProduction code only

Note: PAO (Period After Opening) is shown on cosmetic packaging as an open-jar icon with a number plus “M” for months. The expiration date calculator handles the original unopened shelf life; subtract the PAO once the product is opened.

Article — Expiration Date Calculator

Expiration Date Calculator: How Shelf Life Becomes a Date

An expiration date calculator turns a production date plus a shelf life into a calendar date with days remaining. Shelf life is entered in days, weeks, months or years; the result shows whether the product is fresh, due soon, or already expired.

The math is simple. The judgement is not: which label type is on the package matters more than the date itself, and storage conditions can move the real expiration by weeks. The expiration date calculator handles the math exactly; the surrounding notes explain how to read the result.

What is an expiration date calculator?

An expiration date calculator adds a shelf-life interval to a known production date and reports the result as a calendar date. The interval can be days (yogurt, fresh bread), weeks (deli meat, soft cheese), months (UHT milk, flour, sealed cosmetics) or years (canned goods, dried pasta, OTC medicine).

The expiration date calculator also reports days remaining from today and percent of shelf life elapsed. Negative days mean the product has expired; the calculator shows by how many days. Above 80% elapsed the indicator switches to a warning state to flag items that should be used soon.

Did you know

According to the FAO, roughly one third of all food produced for human consumption is wasted globally. In developed countries the largest single cause is consumer confusion about expiration date labels. Better label literacy could reduce household food waste by 10–20%, the FAO estimates.

Expiration date label types

Packages use several different label vocabularies and they do not all mean the same thing. Use by is a safety deadline set by the FDA, USDA or equivalent EU body: do not consume after this date. Best before or best if used by is a quality guarantee: the product is still safe after this date, but flavour or texture may decline.

Sell by is for the retailer, not the consumer; it tells the store the latest date the item should be on the shelf. Products typically remain good for several more days after the sell-by date if stored properly. The expiration date calculator does not distinguish between the label types — it computes the date you specify, regardless of what the manufacturer called it.

Expiration date by food category

Different food categories have wildly different shelf lives. Fresh pasteurised milk runs 7–10 days under refrigeration; UHT (ultra-high-temperature) milk in sealed cartons runs 6–9 months at room temperature. The processing makes the difference, not the contents.

Eggs in the US are typically dated 28–35 days after packing; the USDA permits up to 30 days between “pack date” and “sell-by date” on cartons. Yogurt runs 14–21 days, hard cheese 6–12 months if vacuum-sealed, dried pasta 2 years, canned vegetables 2–5 years. The expiration date calculator handles any of these intervals.

  • Fresh milk 7–10 days, fridge (4°C)
  • UHT milk 6–9 months, sealed pantry
  • Eggs 28–35 days, fridge
  • Yogurt 14–21 days, fridge
  • Hard cheese 6–12 months, sealed and refrigerated
  • Dried pasta 2 years, dry pantry
  • Canned goods 2–5 years (safe indefinitely if sealed)
  • Honey indefinite, sealed

Expiration date: best before vs use by

The distinction matters most for refrigerated products. Eat fresh dairy a day after “best before” and you risk poor flavour; eat fresh poultry a day after “use by” and you risk salmonella. The FDA recommends following “use by” strictly and treating “best before” as advisory.

For shelf-stable products the gap matters less. Dried pasta two years past “best before” tastes the same as fresh if stored dry; canned tuna ten years past will likely be fine if the seal is intact. The expiration date calculator outputs the manufacturer’s date regardless of label type; the safety call is yours.

Use by means safety, not just quality

In the EU and UK, “use by” is a regulated safety date: shops cannot sell food after it expires, and the product should not be consumed. In the US, the “use by” label is voluntary except for infant formula, but the FDA recommends treating it as a hard deadline for deli meat, soft cheese, hot dogs and unpasteurised juice.

Expiration date on medicine and cosmetics

The expiration date on over-the-counter medicine is a potency guarantee, not a hard safety cliff. A published analysis of the FDA/DoD Shelf Life Extension Program (begun in 1986) found 88% of 122 drug products had at least one lot extended, with average extension of about 5.5 years tested were still at full potency 5–25 years past their stamped expiration date. The exception is liquid antibiotics and biological products, which can lose potency or grow bacteria.

Cosmetics are labelled with a PAO (Period After Opening) instead of a hard expiration date. The open-jar icon with “12M” means use within 12 months of opening. Mascara has the shortest PAO (3 months) because of eye-infection risk; sealed cream can last 24–36 months. The expiration date calculator handles the unopened shelf life; reset the clock once you open.

Storage temperature and expiration date

Stamped expiration dates assume optimal storage. Real shelf life depends heavily on temperature. The standard food-microbiology rule of thumb is that a 10°C rise in storage temperature roughly halves the time until spoilage for most refrigerated foods. A carton of milk left at 10°C instead of 4°C loses about half its remaining shelf life.

Freezing changes the math entirely. At −18°C, microbial activity stops and most foods stay safe indefinitely (though quality declines from oxidation and ice crystal damage). The USDA freezer chart gives 2–6 months for cooked meat, 3 months for fish, 8–12 months for fruits and vegetables before quality loss becomes noticeable. The stamped expiration date no longer applies once the item is in the freezer.

Tip

For perishables, treat the stamped expiration date as a starting point, not a ceiling. Use the expiration date calculator to track the date numerically, then use the “sniff and look” test as you approach it. Trust your senses for fresh foods; trust the date strictly for refrigerated proteins and infant formula.

Month math inside the expiration date calculator

When shelf life is given in months, the expiration date calculator uses calendar months rather than 30-day blocks. January 15 plus 3 months becomes April 15. January 31 plus 1 month becomes February 28 (or 29 in a leap year), because February has no 31st. The rule matches what most spreadsheets and database date functions do internally.

Year math works the same way. February 29, 2024 plus one year is February 28, 2025, not March 1. This is the convention most regulatory bodies and shipping software use, so the expiration date calculator stays compatible with manufacturer-labelled dates produced the same way.

Expiration date mistakes that cause waste

The biggest single cause of household food waste is misreading the expiration date label. Throwing out yogurt one day after “best before” (still safe and good) accounts for a large share of dairy waste in the US and EU. The expiration date calculator helps by separating “date math” from “label interpretation,” but the interpretation step is on you.

The second mistake is forgetting that opening resets the clock. A sealed carton of cream might last six months in the fridge; once opened, the same product is good for three to five days. The expiration date calculator returns the unopened expiry; subtract the “use within X days of opening” instruction once you crack the seal.

FAQ

Type the production date and a shelf life (number plus unit: days, weeks, months or years). The expiration date calculator adds the interval to the production date using calendar-aware math and shows: the calendar date, the weekday, days remaining from today, and percent of shelf life elapsed. Negative days mean the product has expired.
Best before is a quality date set by the manufacturer. Food is usually safe to eat after this date, but flavour or texture may decline. Use by is a safety date: the FDA, USDA and EU food agencies say do not consume after this date. Always trust “use by” over “best before” when both are present.
For shelf-stable items (canned, dried, frozen) past “best before” the FDA and USDA both say yes, with sensory checks. For dairy, meat, or items with “use by” dates: do not. The expiration date calculator shows how many days past expiry, but does not judge safety — that is on the product type and storage conditions.
It is exactly one calendar month, not 30 days. Jan 15 + 1 month = Feb 15. Jan 31 + 1 month = Feb 28 (or Feb 29 in a leap year) because Feb has no 31st. The calculator follows the same rule JavaScript’s Date object and most spreadsheets use.
PAO stands for Period After Opening. It appears as an open-jar icon with a number plus “M” (e.g., “12M”). Once opened, the product is meant to be used within that many months. The expiration date calculator handles the unopened shelf life; subtract the PAO countdown from the day you open the jar.
Freezing at −18°C stops microbial growth and slows oxidation. Most foods stay safe indefinitely but lose quality. USDA guidelines: cooked meat 2–6 months, fish 3 months, bread 3 months, vegetables 8–12 months. The original expiration date no longer applies once the item is frozen.
Yes. The expiration date on the package assumes unopened storage. After opening, follow the “use within X days” instruction on the label — usually 3–7 days for refrigerated items, longer for shelf-stable. The expiration date calculator gives you the unopened expiry; reset it once you open.
Commercial canning combines a hermetic seal with thermal sterilisation. Bacteria, yeast and mould are destroyed before the can is sealed, and no new microbes can enter. The USDA states canned food kept above freezing remains safe indefinitely; the printed date is a quality guideline.