Calculate exponential changes in population, value, or substance over time.
Find the Rate (%) based on Final Value
Find the Final Value based on Rate
Growth (+)
Decay (-)
Understanding Exponential Growth and Decay
The Rate of Growth or Decay is a fundamental concept in mathematics used to describe how a quantity increases or decreases at a constant percentage rate over specific time intervals. This is commonly seen in population studies, radioactive dating, compound interest, and bacterial growth.
The Mathematical Formulas
The general formula for exponential change is:
N(t) = N₀ * (1 + r)t
N(t): The final amount after time t.
N₀: The initial amount (starting value).
r: The growth or decay rate (expressed as a decimal). If r is positive, it's growth; if negative, it's decay.
t: The number of time periods elapsed.
Real-World Examples
1. Population Growth: A town starts with 5,000 residents and grows by 3% annually. To find the population after 10 years: N(t) = 5000 * (1 + 0.03)¹⁰ ≈ 6,719.
2. Radioactive Decay: A sample of a substance loses 10% of its mass every hour. If you start with 200g, how much remains after 5 hours? N(t) = 200 * (1 – 0.10)⁵ ≈ 118.1g.
Growth vs. Decay: The Key Difference
The primary difference lies in the growth factor (1 + r). In growth scenarios, the factor is greater than 1. In decay scenarios, the rate r is subtracted, making the factor less than 1 (between 0 and 1). If you are solving for the rate and the final value is less than the initial value, the calculator will automatically identify it as a decay rate.
function toggleInputs() {
var mode = document.getElementById('calcMode').value;
var finalQtyWrapper = document.getElementById('finalQtyWrapper');
var rateInputWrapper = document.getElementById('rateInputWrapper');
var typeWrapper = document.getElementById('typeWrapper');
if (mode === 'findRate') {
finalQtyWrapper.style.display = 'block';
rateInputWrapper.style.display = 'none';
typeWrapper.style.display = 'none';
} else {
finalQtyWrapper.style.display = 'none';
rateInputWrapper.style.display = 'block';
typeWrapper.style.display = 'block';
}
}
function performCalculation() {
var mode = document.getElementById('calcMode').value;
var n0 = parseFloat(document.getElementById('initialQty').value);
var t = parseFloat(document.getElementById('timePeriod').value);
var resultDiv = document.getElementById('calcResult');
if (isNaN(n0) || isNaN(t) || t <= 0) {
resultDiv.style.display = 'block';
resultDiv.style.borderColor = '#e74c3c';
resultDiv.innerHTML = "Error: Please enter valid numbers for Initial Quantity and Time Periods (t must be greater than 0).";
return;
}
resultDiv.style.borderColor = '#27ae60';
resultDiv.style.display = 'block';
if (mode === 'findRate') {
var nt = parseFloat(document.getElementById('finalQty').value);
if (isNaN(nt) || n0 === 0) {
resultDiv.innerHTML = "Error: Please enter a valid Final Quantity.";
return;
}
// Formula: r = (nt / n0)^(1/t) – 1
var rateDecimal = Math.pow((nt / n0), (1 / t)) – 1;
var ratePct = (rateDecimal * 100).toFixed(4);
var label = (rateDecimal >= 0) ? "Growth Rate" : "Decay Rate";
resultDiv.innerHTML = "Calculated " + label + ": " + ratePct + "% per periodThis means the quantity " + (rateDecimal >= 0 ? "increases" : "decreases") + " by " + Math.abs(ratePct) + "% every time period.";
} else {
var rInput = parseFloat(document.getElementById('ratePercent').value);
var type = document.getElementById('changeType').value;
if (isNaN(rInput)) {
resultDiv.innerHTML = "Error: Please enter a valid Rate Percentage.";
return;
}
var rDecimal = rInput / 100;
var finalValue;
if (type === 'growth') {
finalValue = n0 * Math.pow((1 + rDecimal), t);
} else {
finalValue = n0 * Math.pow((1 – rDecimal), t);
}
resultDiv.innerHTML = "Final Quantity (Nₜ): " + finalValue.toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 4}) + "Based on a " + type + " rate of " + rInput + "% over " + t + " periods.";
}
}