Calculate radioactive decay, drug elimination, or exponential depreciation.
Mass, concentration, activity, or number of atoms.
The time required for the quantity to reduce to half its initial value.
Must use the same time unit as Half-Life (e.g., years, hours).
Remaining Quantity (N(t))
0
Decayed Amount
0
Decay Constant (λ)
0
Probability of decay per unit time
Percentage Remaining
0%
Mean Lifetime (τ)
0
Understanding Decay Rate and Half-Life
In physics, chemistry, and pharmacology, **exponential decay** describes the process of reducing an amount by a consistent percentage rate over a period of time. This concept is fundamental to understanding radioactive isotopes, the elimination of drugs from the body (pharmacokinetics), and even calculating the cooling of objects.
What is Half-Life?
The **half-life** ($t_{1/2}$) is the time required for a quantity to reduce to half of its initial value. The term is most commonly used in nuclear physics to describe how quickly unstable atoms undergo radioactive decay, but it applies to any exponential decay process.
Key Formulas
This calculator uses the standard exponential decay equations:
Scenario: Carbon-14 has a half-life of approximately 5,730 years. If an ancient wooden tool initially contained 100 grams of Carbon-14, how much remains after 2,000 years?
Initial Quantity (N₀): 100 g
Half-Life (t½): 5,730 years
Time Elapsed (t): 2,000 years
Result: Approximately 78.5 grams remaining.
2. Pharmacology (Medicine)
Scenario: A patient takes 500mg of a drug with a half-life of 4 hours. How much active drug remains in the system after 12 hours?
Initial Quantity: 500 mg
Half-Life: 4 hours
Time Elapsed: 12 hours (which is exactly 3 half-lives)
While half-life is intuitive, the **decay constant** (lambda) is mathematically more useful for instantaneous rate calculations. It represents the probability per unit of time that a specific entity will decay. For example, if the decay constant is 0.1/year, roughly 10% of the remaining substance decays that year (for small time steps).
function calculateDecay() {
// Get input values
var N0 = parseFloat(document.getElementById('initialQuantity').value);
var halfLife = parseFloat(document.getElementById('halfLife').value);
var time = parseFloat(document.getElementById('timeElapsed').value);
// Validation
if (isNaN(N0) || isNaN(halfLife) || isNaN(time)) {
alert("Please enter valid numbers for all fields.");
return;
}
if (halfLife <= 0) {
alert("Half-Life must be greater than zero.");
return;
}
if (N0 < 0 || time < 0) {
alert("Initial quantity and time cannot be negative.");
return;
}
// Calculation Logic
// 1. Calculate Decay Constant (Lambda)
// λ = ln(2) / t(1/2)
var lambda = Math.log(2) / halfLife;
// 2. Calculate Remaining Quantity N(t)
// N(t) = N0 * e^(-λt)
var remaining = N0 * Math.exp(-lambda * time);
// 3. Calculate Decayed Amount
var decayed = N0 – remaining;
// 4. Calculate Percentage Remaining
var percentRemaining = (remaining / N0) * 100;
// 5. Calculate Mean Lifetime (Tau)
// τ = 1 / λ
var meanLife = 1 / lambda;
// Display Results
document.getElementById('resRemaining').innerText = formatNumber(remaining);
document.getElementById('resDecayed').innerText = formatNumber(decayed);
document.getElementById('resLambda').innerText = lambda.toExponential(4);
document.getElementById('resPercent').innerText = percentRemaining.toFixed(2) + "%";
document.getElementById('resMeanLife').innerText = formatNumber(meanLife);
// Show results section
document.getElementById('results').style.display = 'block';
}
function formatNumber(num) {
// Formats numbers nicely:
// If very small, use scientific notation.
// If integer-like, no decimals.
// Otherwise, 4 decimal places.
if (num === 0) return "0";
if (num -0.0001) return num.toExponential(4);
if (num >= 1000000) return num.toExponential(4);
// Check if it's effectively an integer
if (Math.abs(num – Math.round(num)) < 0.0000001) {
return Math.round(num).toString();
}
return num.toFixed(4);
}