HomeEveryday › Expiration Date Calculator

Expiration Date Calculator

Enter the date a product was made or opened (blank = today) plus its shelf life in days, weeks, months, or years, and get the exact expiration date, how long until it - or how long ago it passed - and the total shelf window in days.

Expiration date
Status vs. today
Total shelf window

Dates on US food labels (except infant formula) are quality suggestions from the manufacturer, not federal safety deadlines - USDA FSIS.

How the date is computed

Days and weeks are added as exact calendar days. Months and years are added calendar-aware: January 31 plus one month becomes February 28 (or 29 in a leap year), because the target month has no 31st - the date clamps to the month's last day rather than spilling into March. That matches how manufacturers date-code products.

The status row compares the expiration date to today, so you can also use this tool in reverse: enter the packed-on date from a label and the stated shelf life to see whether something in the pantry is past its window and by how many days.

What expiration dates actually mean

In the US, dates like Best If Used By, Sell By, and Use By are manufacturer quality estimates - federal law requires a true expiration date only on infant formula. USDA guidance says food kept properly is often safe past the printed date even if quality slips, while FDA drug expiration dates mark the end of guaranteed full potency. When in doubt with food, judge by storage history and signs of spoilage, not the printed day alone.

How it’s calculated

Expiration = start date + shelf life. Days and weeks add exact days (weeks × 7). Months and years add calendar months (years × 12), clamping to the last day of the target month when the start day does not exist there (e.g., Jan 31 + 1 month = Feb 28). Status = round((expiration − today) / 86,400,000 ms); the shelf window is the same subtraction against the start date. All dates are anchored at noon local time.

Printed food dates are quality conventions, not safety guarantees - storage temperature and handling matter more than the exact day; infant formula and medications should not be used past their labeled dates.

Typical unopened pantry shelf life (quality window)

ProductTypical shelf lifeCounted from
Canned goods, low-acid (meat, vegetables)2-5 yearsPack date
Canned goods, high-acid (tomatoes, fruit)12-18 monthsPack date
Dried pasta1-2 yearsPurchase
White rice2 yearsPurchase
Peanut butter (commercial, unopened)6-9 monthsPantry storage
Ready-to-eat cereal (unopened)6-12 monthsPurchase

Source: USDA FoodKeeper app storage guidelines; windows describe peak quality, not safety cutoffs.

Common mistakes

  • Adding 30 days per month for long shelf lives - 6 months from July 14 is January 14 (184 days), not January 10, and drug or warranty dates go by calendar months.
  • Treating a Best By date as a safety deadline and tossing good food, or the reverse - trusting a date on food that was stored warm.
  • Forgetting that opening resets the clock: an unopened shelf life stops applying the day the seal breaks, so enter the opened-on date with the after-opening window instead.
  • Month-end confusion: one month from the 31st lands on the target month's last day, not the 1st of the following month.

Frequently asked questions

How do I calculate an expiration date from a manufacture date?

Add the stated shelf life to the manufacture date: exact days for day or week windows, calendar months for month or year windows (clamping to the last day of short months). This calculator handles the clamping and leap years automatically.

Is food unsafe the day after its printed date?

Usually not. Except for infant formula, US date labels are the manufacturer's quality estimate, and USDA guidance says properly stored food is often fine past the date. Judge by storage history, appearance, and smell - and discard anything from bulging or damaged cans regardless of date.

What date is one month after January 31?

February 28 in a common year, February 29 in a leap year. When the target month is shorter than the start day, the date clamps to the month's last day - the same rule this calculator and most date-coding systems use.

Do medications really expire?

The expiration date is the last day the manufacturer guarantees full potency and safety, per FDA. Many drugs degrade slowly, but some lose effectiveness or change - do not use expired prescription medication without asking a pharmacist or doctor.

How should I count shelf life after opening a product?

Start a new, shorter clock from the day you opened it - the label's after opening window (often printed as a jar icon with a month count on cosmetics). Enter the opened date and that window here to get the real use-by date.