All posts

Conversion

How to show an estimated delivery date on a Shopify product page

Add a "Order today, get it between Jun 14 and Jun 17" delivery estimate to your Shopify product page with pure Liquid date math. Covers the Unix-timestamp trick, making the lead time a setting, and the timezone caveat. No app required.

Bas Lefeber

Founder, learnshopify.dev · June 12, 2026 · 3 min read

An estimated delivery date (Order today, get it between Jun 14 and Jun 17) is one of the highest-impact things you can add to a product page. It answers the question every shopper has before they buy, and it does it without a single extra click. You can build it with pure Liquid date math, no app.

The catch is that Liquid date arithmetic has one non-obvious trick, and getting it wrong is exactly where copy-pasted snippets fall apart. Here is the correct version.

A Shopify product page showing an estimated delivery date line reading Order today and get it between two dates
A delivery estimate sits naturally under the add to cart button.

The snippet

Create snippets/delivery-estimate.liquid and render it under your buy button. It computes a date range from a minimum and maximum lead time in days:

snippets/delivery-estimate.liquid
{% assign lead_min = 2 %}{% assign lead_max = 5 %} {% assign min_seconds = lead_min | times: 86400 %}{% assign max_seconds = lead_max | times: 86400 %} {% assign delivery_from = 'now' | date: '%s' | plus: min_seconds | date: '%b %-d' %}{% assign delivery_to = 'now' | date: '%s' | plus: max_seconds | date: '%b %-d' %} <p class="delivery-estimate">  Order today and get it between  <strong>{{ delivery_from }}</strong> and <strong>{{ delivery_to }}</strong>.</p>

The trick: dates are just numbers

Liquid has no "add days to a date" filter. The way you do date math is to convert to a Unix timestamp (seconds since 1970), add seconds, then format the result back into a date:

  • 'now' | date: '%s' converts the current time to a Unix timestamp. %s is the timestamp format in the date filter.
  • | plus: min_seconds adds the lead time. Because a day is 86400 seconds, lead_min | times: 86400 is your minimum delivery offset.
  • | date: '%b %-d' formats the resulting timestamp back into a friendly date like Jun 14 (%b is the short month, %-d is the day without a leading zero).

Why if cart.total > 50 isn't the only off-by trap

The most common mistake here is trying to add days to a formatted date string ('now' | date: '%B %d' | plus: 2), which does nothing useful. You must convert to a timestamp with %s first, do the math in seconds, then format. Numbers in, date out.

Make the lead time a merchant setting

Hardcoding 2 and 5 works, but the merchant will want to change it (holidays, supplier delays). Move the lead times into section settings so they are editable in the theme editor:

sections/main-product.liquid (schema)
{  "type": "number",  "id": "delivery_lead_min",  "label": "Minimum delivery days",  "default": 2},{  "type": "number",  "id": "delivery_lead_max",  "label": "Maximum delivery days",  "default": 5}

Then read them at the top of the snippet with {% assign lead_min = section.settings.delivery_lead_min %}. For per-product control instead, store the lead time in a product metafield and fall back to the setting.

The timezone caveat

Liquid renders now in the store's timezone at page-render time, and the result is cached. For a delivery estimate that is fine, it is an approximation by nature. Do not use this technique for anything that needs to-the-second accuracy or a per-shopper countdown; that belongs in JavaScript on the client.

Skip weekends (optional polish)

If you do not ship on weekends, a fixed day count can land a delivery promise on a Sunday. A simple improvement is to widen the max lead time, or to nudge the range when 'now' | date: '%w' (day of week, 0 = Sunday) falls late in the week. Keep it simple: shoppers want a believable window, not a logistics simulation.

Learn this properly · free lesson

Show 'Only N left' next to each variant

Delivery estimates and stock cues are the trust signals that turn a product page into a sale. Build one step by step in our interactive editor, against a live store, with a reviewer checking your work.

Try this lesson — free

Wrapping up

Convert to a timestamp, add seconds, format back to a date: that is the whole technique, and it unlocks any date math you need in Liquid. Add a merchant setting for the lead time and you have a delivery estimate that is honest, editable, and entirely app-free.

Frequently asked questions

How do I show an estimated delivery date in Shopify?

Use a Liquid snippet that converts the current time to a Unix timestamp with 'now' | date: '%s', adds your lead time in seconds (days times 86400), then formats the result back to a date. Render the resulting range under your add to cart button. No app is required.

How do I add days to a date in Shopify Liquid?

Liquid has no add-days filter, so you do the math in seconds. Convert the date to a Unix timestamp with the %s format, add days times 86400 using the plus filter, then format the new timestamp back with the date filter. Adding to a formatted date string does not work.

Can the merchant change the delivery lead time without code?

Yes. Move the minimum and maximum lead times into number settings in your product section schema, then read them with section.settings in the snippet. The merchant can then edit the delivery window from the theme editor.

Is the Liquid delivery date accurate to the shopper's timezone?

It renders in the store's timezone at page-render time and is cached, so treat it as an approximate window rather than an exact promise. For per-shopper, to-the-second accuracy, compute the date in client-side JavaScript instead.

On the launch list

Get updates on the platform.

Same waitlist as the homepage. New posts plus a heads-up when v1 launches. No drip, no spam.

One email when a new module ships, one when v1 launches. No drip sequence, no spam. Unsubscribe anytime.

LiquidConversionProduct page

Keep going in the curriculum