Skip to content

Shelf life and expiry date calculator

Enter the production date and the shelf life and choose the month-end rule. The tool calculates the expiry date without any time zone shift, gives the remaining days and the remaining shelf life percentage, and writes the date in GS1 YYMMDD form. For many batches you can paste the dates as a list.

Free tool · Serialisation
Mode
Pick from the calendar or type the date.
Chooses what applies when adding months or years to a day that does not exist in the target month (e.g. 31 January + 1 month). It has no effect on a shelf life given in days.
If ticked, the expiry date is one day earlier (e.g. 30 days including the production day).
Remaining days and percentage are calculated against this date; type another date to test a later day.
In GS1, DD=00 means "last day of the month"; use it only if you give the date at month level.

The calculation runs in your browser; the dates you enter are not sent anywhere.

expiry = production + shelf life (calendar arithmetic, UTC) · remaining % = (expiry − today) / (expiry − production) × 100 · GS1: (17) YYMMDD

The calculation is calendar arithmetic only. How shelf life is defined (production, filling or packing date; the month-end rule; whether the day is counted) depends on your product, regulation and trading partner; for food, drug or medical device labels rely on the regulation in force and your quality system. The GS1 date format (YYMMDD, DD=00) is written from memory; verify it against the specification before publishing. This calculation is not legal or technical advice.

Let's make your expiry and batch data consistent with your ERP, printer and camera verification.

Request a conversation

01

How to use it

  1. A

    Enter the production date and the shelf life (days, months or years); choose the month-end rule.

  2. B

    Read the expiry date, remaining days, remaining shelf life percentage and the GS1 code.

  3. C

    For many batches, switch to "Batch list" mode; paste the dates, copy the table or download the CSV.

02

How is the expiry date calculated?

For a shelf life in days, calendar days are added: 6 October + 90 days is 4 January. For a shelf life in months and years the day number is kept: 15 January + 6 months is 15 July.

The difficulty arises when the target month does not have the same day: 31 January + 1 month. There are three common rules. The last-day rule gives 28 February (29 in a leap year). The overflow rule keeps the day number and carries the extra days into the next month (3 March). The month-end rule makes the expiry the last day of the target month if production was on the last day of its month; 30 April + 1 month becomes 31 May. Which applies is set by your product specification or your trading partner.

Some practices count the production day as day 1; "30 days" then starts on the production day and ends on the thirtieth day. The tool supports this with an option.

03

Remaining shelf life percentage

The remaining shelf life percentage is the ratio of the days left until expiry to the total shelf life. Retail and distribution contracts often require a minimum remaining shelf life for acceptance into a warehouse or store (for example two thirds). You can test the percentage by entering the delivery date in the today's date field.

A date before production gives 100% and a date after expiry gives 0%, and the status line says it has expired.

04

GS1 date fields

In GS1 application identifiers dates are written YYMMDD: (17) expiration date, (15) best before date, (11) production date. The two-digit year is interpreted relative to the current year, so very distant dates can fall into the wrong century.

If the day is written 00 it means "last day of the month". Use this only if you give the date at month level; encoding a shelf life that ends mid-month with 00 extends the date. The tool warns in that case.

FAQ

Why is 31 January + 1 month 28 February?
Because the last-day rule is selected: if the target month has no 31st, the expiry is the last day of the target month. The overflow rule gives 3 March, and the month-end rule gives 28 February (if production was on the last day of its month). Choose the rule according to your product specification.
Do time zones or daylight saving time affect the result?
No. Dates are held as year-month-day and day counts are taken in UTC; a daylight saving change or your time zone does not shift the day difference.
What does day 00 mean in a GS1 code?
In GS1 date fields day 00 means the last day of the month. It is used when the date is given at month level (e.g. "December 2028"). If the real expiry is not the last day of the month, you extend the date; the tool warns you.
What is the remaining shelf life percentage based on?
(expiry − reference date) / (expiry − production date) × 100. The reference date is today by default; type another date to test the remaining percentage at delivery.
Which date formats does batch mode accept?
YYYY-MM-DD, DD.MM.YYYY, DD/MM/YYYY (day first) and YYMMDD. If you write "batch;date" on a line, the batch label is carried into the output. Dates that cannot be read or do not exist (e.g. 31.02.2026) are marked as errors.

Let's verify expiry and batch data on the line together

We build the consistent flow of batch and expiry data from the ERP through the printer to camera verification, end to end, and test it on site.