ForHosting KIT · Health & fitness

Prescription refill calculator

30 tablets at one a day, filled on 1 March 2026, last 30 days, so the next refill falls on 31 March. Enter the quantity, the daily dose and the fill date to plan your next pharmacy visit. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Quantity
30
Daily dose
1
Fill date
2026-03-01
You get
Days covered
30
Refill date
2026-03-31

A prescription refill calculator answers a narrow, practical question: given how many units were dispensed, how many of those units are taken each day, and the calendar day of the fill, how many days does the supply last and on which date should the next refill be planned. This tool computes days covered as the whole-number quotient of quantity divided by daily dose, then adds that count to the fill date with proleptic Gregorian arithmetic so month lengths and leap days stay correct without touching the host clock.

What days covered means and how the next refill date is computed

Pharmacy days' supply — often searched as day supply or days covered — is the number of calendar days a dispensed quantity lasts when taken at the prescribed daily dose. Quantity is the number of units handed to the patient: tablets, capsules, millilitres of liquid, or puffs, as long as quantity and daily dose share the same unit. Daily dose is how many of those units are consumed in one day.

Flooring to a whole number is the conventional days-supply rule used on labels and insurance claims: a refill date is a calendar day, not a fraction, and a leftover partial dose does not extend coverage through the next midnight. Thirty tablets at one tablet per day last thirty days. Ninety tablets at two per day last forty-five days.

Ten tablets at three per day last three full days, with one tablet remaining, which does not buy a fourth covered day. Coverage on the fill date counts as day one of the supply: a thirty-day fill on the first of January is exhausted after the thirtieth, and the next refill date is the thirty-first. The path is educational and deterministic; it does not replace a pharmacist's professional judgment, early-refill rules, or insurance overrides for individual patients.

Adherence and refill-planning worksheets

Turn a thirty-count once-daily bottle or a ninety-count twice-daily bottle into a next refill date without a spreadsheet serial, then vary the fill date across month ends.

How is days covered calculated from quantity and daily dose?

Thirty units at one per day last thirty days; ten units at three per day last three full days. Quantity and daily dose must share the same unit and both must be strictly positive.

How is the next refill date calculated?

A thirty-day supply filled on 2026-03-01 refills on 2026-03-31. Coverage on the fill date counts as day one. Leap years and month lengths are handled with civil serial arithmetic, not the host clock.

What happens if quantity or daily dose is zero or negative?

Quantity and daily dose must be positive numbers; zero, negative, missing, and non-numeric values are rejected and are not billed.

Why does a leftover tablet not add an extra day?

Because days of supply are counted in whole days. Ten tablets at three a day last three full days; the one tablet left over is not a full day's dose, so it does not move the refill date.

Can I use it for liquid medicine or inhalers?

Yes. Quantity can be tablets, capsules, millilitres or puffs, as long as the daily dose is given in the same unit. Mixing units, such as millilitres dispensed and tablets per day, gives a wrong result.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/health/prescription-refill

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/health/prescription-refill \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"quantity":30,"daily_dose":1,"fill_date":"2026-03-01"}'
{
  "quantity": 30,
  "daily_dose": 1,
  "fill_date": "2026-03-01"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "health.prescription_refill",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Quantity and daily dose must both be strictly positive finite numbers; zero, negative, missing, and non-numeric values fail with invalid_input and are not billed.

What days covered means and how the next refill date is computed

This calculator uses the integer identity days_covered equals the floor of quantity divided by daily_dose. The next refill date is the fill date plus days_covered using proleptic Gregorian serial day counts. Equivalently, refill_date equals fill_date plus days_covered days.

Input contract, response shape, and error behaviour

Days covered above thirty-six thousand five hundred (one hundred years) are rejected so a microscopic daily dose cannot invent a date past year 9999. Failed validation is not billed. Send a JSON body with three required fields. The field quantity (aliases qty, quantity_dispensed, qty_dispensed, dispensed, units) is the amount dispensed and must be a strictly positive finite number or numeric string, at most one million. The field daily_dose (aliases dose, dose_per_day, daily_consumption, units_per_day, per_day) is the amount taken each day in the same unit and must likewise be a strictly positive finite number at most one million. The field fill_date (aliases date, filled_on, fill, dispensed_on) is the calendar day of the fill as a real Gregorian date in YYYY-MM-DD form with years from one through nine thousand nine hundred ninety-nine; impossible days such as the thirty-first of February are rejected. Each numeric field may arrive as a JSON number or as a numeric string; empty strings, non-finite values, and missing fields fail with invalid_input. On success the body echoes rounded quantity and daily_dose, the normalized fill_date, integer days_covered, refill_date as YYYY-MM-DD, and a formula string restating the identity. Example: quantity thirty, daily_dose one, fill_date two thousand twenty-six March first yields days_covered thirty and refill_date two thousand twenty-six March thirty-first. Example: quantity ninety, daily_dose two, fill_date two thousand twenty-six December fifteenth yields days_covered forty-five and refill_date two thousand twenty-seven January twenty-ninth, crossing the year boundary without a host clock. A successful API call costs the published $0.002 base price with unit item.

When this calculator helps, and what it will not do

Use this landing when the search is for a prescription refill date or a days-supply calculator from quantity, daily dose, and fill date, not when the visitor needs a gestational calendar, a caffeine half-life, or a recipe scaler. Pharmacy-tech classrooms can freeze a thirty-tablet once-daily fill and vary the fill date so learners see month-end and leap-day carry without a spreadsheet date serial. The tool does not apply early-refill windows, copay logic, controlled-substance limits, or remaining-refill counts from a pharmacy claim, and it does not convert tablets to millilitres or guess a default daily dose from free-text sig. Prefer numbers rather than pre-formatted strings when you control the client; string numbers are accepted only when they match a strict finite numeric pattern. Adherence worksheets can compare an intended thirty-day cycle against a twice-daily ninety-count bottle and read days_covered and refill_date directly from the JSON. Automation tests can pin expected values for a year-boundary fill, a leap-year fill, and the required invalid_input path when quantity is zero or daily dose is not a positive number. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately send a zero quantity.

Pharmacy-tech classroom checks

Give learners a quantity, a daily dose, and a fill date and compare hand-counted days' supply plus the next refill calendar day against the deterministic days_covered and refill_date fields.

Automation fixtures without Date.now

Pin known-good year-boundary and leap-year refill dates plus the required invalid_input path when quantity or daily dose is not a positive number.

Does the prescription refill calculator handle leap years and month ends?

Yes. fill_date is validated as a real YYYY-MM-DD civil day, converted with days_from_civil, advanced by days_covered, and converted back. 29 February is accepted only in leap years; 31 February is always invalid_input.

What does the prescription refill calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →