Half-life calculator
Start with 100 units and a half-life of 10: after 20 time units, 25 remain and 75 have decayed. Enter the initial amount, the half-life and the elapsed time in one unit to get what is left. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Initial quantity
- 100
- Half life
- 10
- Elapsed time
- 20
- Remaining
- 25
- Decayed
- 75
- Fraction remaining
- 0.25
- Percent remaining
- 25
Half-life decay describes how a radioactive nuclide, a pharmaceutical tracer, or any first-order decaying inventory loses half of its quantity every fixed interval of time. The classical relation is N of t equals N zero times one-half raised to the power of t over t half, so that after one half-life half remains, after two quarters remain, and so on without needing tables for every isotope. This capability accepts an initial quantity, a positive half-life, and a non-negative elapsed time in matching units, returns the remaining amount together with fraction remaining, percent remaining, amount decayed, and half-lives elapsed, and rejects negative time with a clear invalid input error so pipelines never run physics backward by accident.
How exponential half-life decay works and which inputs to send
Write the problem with a single consistent time unit for both the half-life and the elapsed time, and a single consistent quantity unit for the initial amount—grams, becquerels, milligrams of drug, or arbitrary inventory counts all work as long as you do not mix them mid-calculation. The governing formula is N of t equals N zero times one-half raised to t divided by t half.
After exactly one half-life the remaining amount is half of the start; after two half-lives it is one quarter; after zero elapsed time it is still the full initial quantity. Initial quantity must be non-negative; half-life must be strictly positive because a zero or negative half-life makes the power undefined or non-physical in this model; elapsed time must be non-negative because this product is forward decay only.
Identical inputs always produce identical outputs because the path is pure arithmetic with no network call, no model, no random seed, and no wall clock. Classroom examples include finding how much of a hundred milligram sample remains after two half-lives of ten units each, or what fraction of activity is left after three half-lives of a diagnostic isotope.
Reading the response: remaining amount, fractions, and half-lives elapsed
Decayed is the absolute amount lost, equal to initial quantity minus remaining, so inventory UIs can show both stock left and stock gone without a second subtraction. Fraction remaining is remaining divided by the initial quantity when the start is positive, and percent remaining multiplies that fraction by one hundred for human-facing dashboards. Half lives elapsed equals elapsed time divided by half-life and is the exponent used under the power of one-half, which is useful when grading software checks the intermediate step students write on paper.
Use remaining alone when a form only needs the final mass or activity; use fraction remaining and half lives elapsed when a worksheet must show intermediate reasoning; use the full object when a prep sheet prints start, time, half-life, and end together. Validation failures such as negative time mention the offending field so technicians can correct a sign error without reading a stack trace.
What you can do with it
Radiopharmacy and tracer prep sheets
Technicians enter calibrated activity, isotope half-life, and time until administration; the calculator returns remaining activity for dose planning worksheets.
FAQ
Do half-life and elapsed time need the same units?
Yes. The engine treats both as pure numbers and does not convert days to hours or years to seconds. Keep them in the same time unit yourself.
Is the half-life calculator free?
The browser tool runs free on your device.
What formula does the calculator use?
N(t) = N0 × (1/2)^(t / t½). After one half-life half remains; after two half-lives one quarter remains.
What happens if the elapsed time is negative?
It is refused. The calculator only projects decay forward in time, so a negative time would mean running the physics backward, and you get a clear message instead of a made-up growth.
Can it handle decay chains or estimate a half-life from measurements?
No. It models one substance with one half-life decaying forward. For a chain, run each species separately, and if you need the half-life from measured points, fit it elsewhere first.
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/half-life \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"initial_quantity":100,"half_life":10,"elapsed_time":20}'const res = await fetch("https://api.kit.forhosting.com/chem/half-life", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"initial_quantity": 100,
"half_life": 10,
"elapsed_time": 20
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/half-life",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"initial_quantity": 100,
"half_life": 10,
"elapsed_time": 20
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/half-life", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"initial_quantity":100,"half_life":10,"elapsed_time":20}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"initial_quantity":100,"half_life":10,"elapsed_time":20}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/half-life", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"initial_quantity": 100,
"half_life": 10,
"elapsed_time": 20
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.half_life",
"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.
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
How exponential half-life decay works and which inputs to send
Send JSON with required fields initial_quantity, half_life, and elapsed_time as finite numbers or numeric strings. Documented aliases such as N0, amount, t_half, halfLife, time, and elapsed are accepted so client code can speak laboratory English without renaming every key. Negative elapsed time fails with invalid_input rather than extrapolating growth into the past.
Reading the response: remaining amount, fractions, and half-lives elapsed
On success the response echoes the three inputs and adds remaining as the primary N of t result after stable floating-point rounding. The formula field restates N of t equals N zero times one-half to the power of t over t half, and method is always exponential_half_life so downstream routers can branch without sniffing shapes. Missing fields, non-finite numbers, non-positive half-life, and negative initial quantity also raise invalid_input and are not charged after the engine rejects the request.
API usage, pricing, lab workflows, and practical limits
Call the free in-browser half-life calculator for homework checks, lecture demos, and quick nuclear-medicine or environmental inventory estimates without installing a spreadsheet power formula. Multi-nuclide chains, branching decay, and half-life estimation from measured points are out of scope for this single-exponential forward model—run one call per species or fit half-life elsewhere, then call this calculator to project remaining amount. Authors shipping SDKs can map the three inputs into labeled fields Initial amount, Half-life, and Elapsed time with remaining auto-filled—the same columns students write when they apply N equals N zero times one-half to the power of t over t half by hand on paper. Send a JSON body with initial_quantity, half_life, and elapsed_time as numbers or numeric strings in matching units. Use the prepaid API when a LIMS integration, tutoring platform, radiopharmacy planner, or monitoring script needs a stable contract under KIT balance at $0.002 per successful item; validation failures never consume balance after the engine rejects the request. Pair this endpoint with unit conversion helpers in your own pipeline when the next step is converting days to hours so half-life and elapsed time share a scale.
Integration use cases
Homework and exam verification
Students compute remaining mass or activity after a given number of half-lives and compare against structured JSON, with a clear error when negative elapsed time is submitted by mistake.
Environmental inventory and teaching apps
Scripts and curriculum tools call a stable prepaid endpoint instead of reimplementing exponential half-life arithmetic in every language and spreadsheet.
Technical questions
How do I calculate remaining amount with this half-life calculator?
Send JSON with initial_quantity, half_life, and elapsed_time (for example 100, 10, and 20). The response includes remaining, fraction_remaining, percent_remaining, and half_lives_elapsed.
What happens if elapsed time is negative?
The request fails with invalid_input. This capability implements forward exponential decay only; negative time is rejected and not charged.