First-order shelf-life calculator
With a first-order rate constant of 0.001 per day, ten percent of the active substance is gone after about 105.36 days. Enter k and get that t90 shelf life, with the formula and each substitution step laid out. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Rate constant
- 0.001
- K
- 0.001
- Remaining fraction
- 0.9
- Percent decomposition
- 10
- Shelf life
- 105.3605156578
A first-order shelf-life calculator turns a first-order degradation rate constant into the time required for ten percent of the drug substance, food active, or chemical species to decompose. Enter k for a process whose concentration falls exponentially as C equals C0 times e to the minus k t; the tool returns t90 equals minus the natural log of 0.9 divided by k, echoes the rounded rate constant, the fixed remaining fraction 0.9, a short formula string, step-by-step substitution, and a clear English message. Stability reports, pharmacy homework, exam prep, and coding kata expected values all need that same closed form without opening a computer-algebra system.
What first-order shelf life (t90) means for exponential degradation
In chemical kinetics and pharmaceutical stability science a first-order degradation process with rate equal to k times concentration obeys the integrated law C of t equals C zero times e to the minus k t. Shelf life for a ten percent loss is the time t90 at which only ninety percent of the initial amount remains, so the remaining fraction is exactly zero point nine.
Taking the natural logarithm of both sides of zero point nine equals e to the minus k t90 and rearranging yields the closed form t90 equals minus the natural log of zero point nine divided by k, which is the same as the natural log of one over zero point nine divided by k. That single real number is the time at which ten percent has decomposed under first-order kinetics when the rate constant is known in reciprocal time units.
Unlike second-order half-life, first-order t90 does not depend on the starting concentration—only on k—so a faster degradation constant shortens shelf life proportionally. Teachers and automated graders care about the zero-k rejection as much as the happy path: a student who plugs k equals zero into the formula has left the domain of this tool, and a silent return of infinity would hide that mistake. Units must stay consistent: if k is reported per day, t90 comes out in days; if k is per second, t90 is in seconds.
Practical tips, limits, and related searches
Keep k inside the published absolute range so the quotient cannot overflow into a non-finite shelf life that the solver must reject. Prefer sending numbers rather than pre-formatted strings when you control the client; string numbers are accepted only when they match a strict finite numeric pattern. Near-zero inputs after floating noise are rejected so a tiny accidental zero does not produce an enormous t90.
Prefer this capability when you already have a first-order k and only need the time for ten percent loss; if your source is assay data over time, extract or fit k first.
What you can do with it
Homework checks for first-order stability
Students enter k from textbook degradation problems and compare hand-written t90 and unit consistency against a deterministic result before submitting.
Stability report cross-checks
After fitting a first-order rate constant from assay or concentration data, compute t90 for the discussion section or specification justification.
FAQ
What is first-order shelf life t90?
For first-order degradation C = C₀·e^(−k·t), t90 is the time when 10% has decomposed (90% remains). The closed form is t90 = −ln(0.9)/k.
Is t90 the same as half-life?
No. Half-life t½ uses 50% remaining (ln(2)/k). This calculator uses the 10% decomposition (90% remaining) shelf-life convention.
Does shelf life depend on initial concentration?
Not for first-order kinetics. Only the rate constant k enters t90 = −ln(0.9)/k; second-order half-life does depend on [A]₀.
Is the first-order shelf-life calculator free?
The browser tool is free and runs locally.
What units does the t90 result use?
The same time unit as your rate constant. If k is given per day, t90 comes out in days; if k is per second, the answer is in seconds, so keep both on the same time scale.
Related tools
For developers — API access
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.
API endpoint
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.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/chem/shelf-life-first-order \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"rate_constant":0.001}'const res = await fetch("https://api.kit.forhosting.com/chem/shelf-life-first-order", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"rate_constant": 0.001
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/shelf-life-first-order",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"rate_constant": 0.001
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/shelf-life-first-order", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"rate_constant":0.001}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"rate_constant":0.001}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/shelf-life-first-order", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"rate_constant": 0.001
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.shelf_life_first_order",
"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.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_abs | 1000000000000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
When the rate constant is zero the shelf life is undefined, so the API returns a clear invalid_input error instead of infinity or a silent NaN.
What first-order shelf life (t90) means for exponential degradation
The check path recomputes the logarithmic factor and the division with the same fixed rounding used for published fields, so a successful response always ships with steps you can assert in tests or worksheets without floating drift between Worker and browser.
How to call the API and what comes back
The rate constant must be nonzero; values whose absolute value is at or below one times ten to the minus fifteen are treated as zero and rejected because division by zero would make shelf life undefined. Send a JSON body with one required finite number: rate_constant (aliases k, k_constant, first_order_k, rate_k, and degradation_k). Absolute values must stay within the published limit of one trillion so the quotient remains finite in IEEE double precision on the Worker and in the browser. On success the response echoes rounded rate_constant and k, sets remaining_fraction to zero point nine and percent_decomposition to ten, sets shelf_life and t90 to the same rounded t90 value, formula to the string t90 equals minus ln of zero point nine over k, message to a short English summary, and steps to an ordered array of substitution lines that show the logarithmic factor and the final quotient. Failed validation—missing field, non-finite numbers, values outside absolute limits, zero or near-zero k, or a non-finite shelf life—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.
Practical tips, limits, and related searches
When teaching, pair examples: k equals zero point zero zero one yields t90 approximately one hundred five point three six in the same time unit as one over k; k equals zero point zero one yields roughly ten point five three six; and k set deliberately to zero demonstrates the hard invalid_input path for division by zero. This landing targets people searching for a first-order shelf-life calculator, t90 ten percent decomposition, or pharmaceutical first-order kinetics shelf life online; it is not a half-life tool t½ equals ln two over k, not a second-order half-life calculator, and not a nonlinear fit of k from a concentration-versus-time series. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately set the rate constant to zero. Round-trip checks are easy: recompute minus ln of zero point nine over k by hand and confirm it equals the published shelf_life within the same twelve-decimal rounding, and confirm that doubling k halves t90 when the remaining fraction is held fixed at ninety percent.
Integration use cases
Unit tests for kinetics solvers
Generate known-good shelf-life cases plus deliberate zero-k rejections for coding kata expected values and CI golden fixtures.
Technical questions
What happens when the rate constant is zero?
Shelf life is undefined (division by zero). This tool returns invalid_input instead of infinity or NaN.