Back to the shelf

021

Shelf Life Calculator

A calculator that converts a customer's shelf-life requirement into the dispatch percentage your system needs.

Launched · Started January 2026 · Tool · Vibe-Coded

That's the whole thing.

The site's sound is off. The narration still plays.

This reading didn't load. The transcript is below.

Read the transcript

Say a shipment leaves at ninety percent shelf life. By the time it reaches the customer, transit has consumed some of that. The customer needed eighty percent on arrival. Was the dispatch figure right?

Sales teams at Venus Remedies worked this out by hand before every dispatch entry. This was slow and easy to get wrong. I built this calculator to fix that.

You give it the product shelf life, transit days, shipment mode, and what the customer needs. It back-calculates the right dispatch percentage. It handles multi-hop supply chains. One file, runs entirely in the browser.

Coded with AI, starting January twenty twenty-six. It does one thing well. Try it.

Narrated in my own cloned voice, generated with ElevenLabs v4.

Shelf Life Calculator
No. 021

The customer tells you the shelf life they need when the stock arrives at their warehouse. The system asks for something else: the percentage at the point of dispatch. Those two numbers differ because transit takes time. Before this calculator, the sales team worked the conversion out by hand.

I built this for a pharma company’s sales teams in January 2026, coded with AI. You give it the product’s total shelf life, the shipment mode, the transit days, and the customer’s requirement. That requirement can come in three forms: as a percentage, as a number of months, or as a date the stock needs to arrive. In date mode, you also enter the planned manufacturing month, and the calculator works back to tell you when the stock needs to leave. It handles multi-hop supply chains too.

The whole thing is a single HTML file. It runs entirely in your browser. No server, no install. Send the file and it works on any device.

It’s live. You can try it.

The making

  • HTML
  • CSS
  • JavaScript

01 · The problem

Before it existed

What hurt

A customer states the shelf life needed on arrival. The order system asks for the percentage at dispatch. Sales converted this by hand, and it failed at dispatch.

Who uses it

  • Sales team
  • Order desk
  • Export sales
  • 52commits
  • 3ways to state the need
  • 4shelf-life bands, each with its own threshold

02 · The flow

6 steps, in the order they happen

  1. 01 / 06

    Pick the shelf life

    You
    Taps 18, 24, 30 or 36 months
    It answers
    Answers at once with the percentage to enter, colour-coded for feasibility
    Phone screen in two halves: shelf life buttons, air or sea, a customer slider at 85 per cent and a result card reading 91 per cent
  2. 02 / 06

    Choose air or sea

    You
    Switches the shipment mode
    It answers
    Resets transit to 7 days by air or 45 by sea, and the answer moves
    Air selected with 7 days of transit and a comfortable-margin result of 86 per cent
  3. 03 / 06

    State the need in months

    You
    Moves to Mo and slides the months required
    It answers
    Converts months at the warehouse into the same dispatch percentage
    Months mode showing 20 months required and a result of 89 per cent
  4. 04 / 06

    Or give a required date

    You
    Enters the date the stock must reach the customer
    It answers
    Subtracts transit, names the date it must leave, and shows the manufacturing month
    Date mode with a required date and the line saying the stock must leave by 14 February 2027
  5. 05 / 06

    Read the verdict

    You
    Looks at the colour and the pill
    It answers
    Green is comfortable, orange is tight, red is over 100 per cent and not feasible
    Eighteen-month product with 60 days at sea, result 96 per cent, marked tight
  6. 06 / 06

    Copy it across

    You
    Taps Copy, or opens the guide
    It answers
    Puts the integer on the clipboard for the order system; the guide explains each input
    The user guide: how to use this calculator, step by step

03 · What was special

What it stands on

  1. One screen, one job

    Five inputs, one answer. No login, no install; one HTML file that runs on any device.

  2. Three ways in

    Percentage, months, or a required date. Whatever the customer states is the input.

  3. Feasibility built in

    The colour follows the plant’s own threshold for each shelf-life band, so a tight order is flagged before it is entered.

One question, one number, copied straight across.

Making-Of

The customer states one number. The system wants another. This turns one into the other.

The first commit and the Notion build hub, the same day

  1. The world before

    Customers state shelf life at their own warehouse. The order system asks for the percentage at dispatch, and transit eats into shelf life along the way. Sales converted by hand, inconsistently.

  2. One day

    16 January 2026. One file, built the same day: shelf life, shipment mode, transit days and the customer’s requirement in, the percentage to enter out.

  3. Because of that

    1. Month input and a percentage slider were added for customers who state it that way (17 January).
    2. The tool was opened to all sales teams, with a user guide and tighter feasibility thresholds (7 April).
    3. A date mode arrived: give the required date and it works back to when stock must leave (10 April).
    4. Feasibility now follows a threshold for each shelf-life band, and the month convention was corrected to the pharma standard (12 and 20 April).
    5. The result card was redesigned and date mode was rebuilt around the customer’s warehouse date and transit (23 and 24 June).
  4. Until finally

    The calculator is live on Vercel as version 1.8 and is the sales team’s one-step answer for the order system.

  5. Since then

    In August its README was refreshed from the code by an AI agent, so the docs match what runs.

The evidence Process, hands, and artifacts

Process

  1. Origin

    One file, one question, the dispatch percentage

  2. Reach

    Open it to all sales teams, add a guide and tighter thresholds

  3. Date mode

    Required date in, must-leave date and manufacturing month out

  4. Feasibility

    A threshold per shelf-life band

  5. Convention

    Expiry is the last day of the month, the pharma way

  6. Result card

    A single, refined answer card; slot animation and escalating copy

  7. Date rebuild

    Date mode uses the customer warehouse date plus transit

Hands

Akshansh

  • The problem, the rules and the feasibility thresholds
  • Product rulings at each release
  • Review of what the agents built

Agents

  • Claude CodeMost feature work and the June redesign
  • AmpCo-authored fixes and documentation
  • CursorREADME and docs refresh