Number of half-lives calculator
20 hours with a 10-hour half-life is exactly 2 half-lives, which leaves 25 % of the start. Enter the elapsed time and the half-life in one unit to get the count, the complete half-lives and the leftover fraction. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Elapsed time
- 20
- Half life
- 10
- Half lives
- 2
- Whole half lives
- 2
- Fractional part
- 0
- Fraction remaining
- 0.25
Counting half-lives is the intermediate step students and lab planners write before they convert a start amount into a remaining inventory. The definition is simple and unit-agnostic: the number of half-lives elapsed equals total elapsed time divided by the half-life of the species, so twenty hours with a ten-hour half-life is exactly two half-lives, and three days with a twelve-hour half-life is six half-lives when both times share the same unit. This capability accepts non-negative elapsed time and a strictly positive half-life, returns the full half-lives count together with the whole-number floor, the fractional remainder, and the pure exponential fraction remaining under one-half to the power of that count, and rejects a zero half-life with a clear invalid input error so pipelines never divide by zero by accident.
How the number of half-lives is defined and which inputs to send
Write the problem with a single consistent time unit for both the half-life and the elapsed time—seconds, minutes, hours, days, or years all work as long as you do not mix them mid-calculation. The governing definition is n equals t divided by t half. After exactly one half-life the count is one; after two half-lives it is two; after zero elapsed time the count is zero.
Fractional values are normal and expected: forty-five minutes with a thirty-minute half-life is one and a half half-lives, which still drives exponential decay through the continuous exponent even when students prefer to think in whole steps. Elapsed time must be non-negative because this product counts forward decay time 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 converting a twenty-four hour wait with an eight-hour isotope half-life into three half-lives, or checking that a sample stored for half of its half-life has a count of zero point five.
Reading the response: half-lives count, whole steps, and remaining fraction
Whole half lives is the integer floor of that count, useful when a worksheet asks how many complete half-lives have finished before the current partial interval. Fractional part is the remainder between zero and one so grading software can check the incomplete step students write on paper. Fraction remaining applies the pure exponential model of one-half raised to the power of the half-lives count, which is the remaining fraction of a unit starting amount; percent remaining multiplies that fraction by one hundred for human-facing dashboards.
Validation failures such as zero half-life mention the offending field so technicians can correct a missing measurement without reading a stack trace.
What you can do with it
Radiopharmacy and tracer timing sheets
Technicians enter time until administration and isotope half-life; the calculator returns how many half-lives will have passed for dose planning worksheets.
FAQ
What happens if half-life is zero?
Division by zero is undefined; a zero half-life is rejected and not charged.
Do elapsed time and half-life 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 number of half-lives calculator free?
The browser tool runs free on your device.
What formula does the calculator use?
n = t / t½. After one half-life the count is 1; after two half-lives the count is 2.
Can the number of half-lives be a fraction?
Yes, and that is normal. Forty-five minutes with a thirty-minute half-life is one and a half half-lives. The calculator also splits the count into complete half-lives and the leftover part.
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-lives-elapsed \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"elapsed_time":20,"half_life":10}'const res = await fetch("https://api.kit.forhosting.com/chem/half-lives-elapsed", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"elapsed_time": 20,
"half_life": 10
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/chem/half-lives-elapsed",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"elapsed_time": 20,
"half_life": 10
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/chem/half-lives-elapsed", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"elapsed_time":20,"half_life":10}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"elapsed_time":20,"half_life":10}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/chem/half-lives-elapsed", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"elapsed_time": 20,
"half_life": 10
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "chem.half_lives_elapsed",
"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 the number of half-lives is defined and which inputs to send
Send JSON with required fields elapsed_time and half_life as finite numbers or numeric strings. Documented aliases such as time, t, elapsed, duration, halfLife, t_half, and half_life_period are accepted so client code can speak laboratory English without renaming every key. Half-life must be strictly positive: a zero half-life makes the division undefined and is rejected with invalid_input, while a negative half-life is non-physical for this model and is also rejected.
Reading the response: half-lives count, whole steps, and remaining fraction
On success the response echoes the two inputs and adds half_lives as the primary result after stable floating-point rounding of elapsed time over half-life. The formula field restates n equals t over t half, and method is always half_lives_elapsed so downstream routers can branch without sniffing shapes. Use half_lives alone when a form only needs the exponent; use whole and fractional fields when a lab sheet must show complete steps versus leftover time; use fraction remaining when the next sentence of a problem multiplies by an initial mass or activity. Missing fields, non-finite numbers, negative elapsed time, and non-positive half-life 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 number of half-lives calculator for homework checks, lecture demos, and quick nuclear-medicine or environmental inventory estimates without installing a spreadsheet division formula. Multi-nuclide chains, branching decay, and half-life estimation from measured points are out of scope for this pure ratio model—run one call per species or fit half-life elsewhere, then call this calculator to count elapsed half-lives. Authors shipping SDKs can map the two inputs into labeled fields Elapsed time and Half-life with half-lives auto-filled—the same columns students write when they apply n equals t over t half by hand on paper. Send a JSON body with elapsed_time and half_life 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 a remaining-amount half-life tool when the next step is multiplying an initial quantity by one-half to the power of the count, or with your own unit conversion helpers 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 convert elapsed time and half-life into the number of half-lives for decay problems and compare against structured JSON, with a clear error when half-life is zero.
Environmental inventory and teaching apps
Scripts and curriculum tools call a stable prepaid endpoint instead of reimplementing t over t½ arithmetic in every language and spreadsheet.
Technical questions
How do I calculate the number of half-lives with this calculator?
Send JSON with elapsed_time and half_life (for example 20 and 10). The response includes half_lives equal to t / t½, plus whole_half_lives and fractional_part.