Dates & Time

Shelf Life & Expiration Date Calculator

Give it a production or packaging date and a shelf life, and it returns the exact expiry date, the day of the week it lands on, and how many days are left. It treats food, medicine, and inventory dates the same way.

Reviewed and updated

How to use
  1. Enter the production or packaging date.
  2. Set the shelf life and switch its unit (days, weeks, months, or years).
Date math uses your inputs as given; check time-zone and leap-year edge cases.
Was this helpful?

Shelf life added to a start date

The expiry date is the start date plus the shelf life. To count how much time is left, the shelf life is converted to days, added on, and the gap to today is measured.

expiry date = start date + shelf life

Weeks count as 7 days and years as 365. Months are treated as about 30 days, so a date built from a month count can land a day or two off a strict calendar month. For a firm deadline, prefer a shelf life stated in days.

The label word decides what the date means

Two products can carry the same date and mean very different things. Quality dates are advisory; safety dates are not.

LabelWhat it meansAfter it passes
Best beforeQuality guaranteeUsually still safe; may lose flavor or texture
Use bySafety deadlineDo not eat
Sell byStock date for the retailerNot aimed at you; buy before it for freshness

Typical unopened shelf life

ProductShelf lifeStored
Milk7–10 daysRefrigerated
Yogurt3–4 weeksRefrigerated
Eggs4–5 weeksRefrigerated
Butter4–6 monthsRefrigerated
Flour6–8 monthsCool, dry pantry
Hard cheese6–12 monthsRefrigerated, sealed
Canned goods2–5 yearsCool, dry pantry

These assume proper storage. Heat, damp or light shorten real shelf life below the printed date. Freezing pauses spoilage but does not reset the date once thawed.

Common questions

How is the expiry date worked out?

Add the shelf life to the start date. The tool converts the shelf life to days first (weeks are 7 days, months about 30, years 365), adds them to the packaging or production date, then counts the days between that result and today to show how long is left.

Is "best before" the same as "use by"?

No. Best before is about quality, so the food is usually still safe after it if stored well, it just may lose flavor or texture. Use by is a safety deadline; do not eat the product after it. Sell by is for the shop, not you.

Does the expiry date still hold after I open the package?

No. The printed date assumes an unopened package. Once opened, the safe window is usually much shorter, sometimes only a few days, so follow any separate "once opened" guidance on the label.

From the blog

Guides & how-tos

All articles →