Exponential Regression Calculator
Fit an exponential growth or decay curve to your data and get the equation, R², and predictions instantly.
📖 What is Exponential Regression?
Exponential regression fits the model y = a·e^(bx) to a dataset, where a and b are constants determined by the method of least squares. It is the appropriate regression model whenever the rate of change of Y is proportional to Y itself - a hallmark of many natural and economic processes.
Classic examples include bacterial colony growth (doubling at a fixed rate), radioactive decay (activity falls by a fixed fraction per unit time), compound interest (balance multiplied by a fixed factor each period), and the early exponential phase of epidemic spread. In all these cases the relationship between time (X) and the quantity of interest (Y) follows a multiplicative pattern best captured by the exponential function.
The computational method is log-linearisation: since ln(ae^(bx)) = ln(a) + bx, taking the natural logarithm of Y transforms the problem into a standard linear regression of ln(Y) on X. The slope of that line is b, and the intercept is ln(a), so a = e^intercept. This approach is computationally simple and exact when errors are log-normally distributed.
This calculator performs all steps automatically: validates that Y values are positive, performs the log transformation, applies ordinary least-squares linear regression, back-transforms to recover a and b, and reports R² on the original scale for interpretability. It also calculates the implied growth or decay rate per unit X and the doubling time (for growth) or half-life (for decay).
📐 Formulas
Log-linearisation: ln(y) = ln(a) + bx, so define Y' = ln(y) and fit Y' = β₀ + β₁x by ordinary least squares.
Slope b: b = [n·Σ(x·ln y) − Σx·Σln y] / [n·Σx² − (Σx)²]
Intercept ln(a): ln(a) = (Σln y)/n − b·(Σx/n), therefore a = exp(ln(a))
R² (original scale): R² = 1 − Σ(yᵢ − ŷᵢ)² / Σ(yᵢ − ȳ)²
Growth rate per unit X: rate = (e^b − 1) × 100%
Doubling time (b > 0): t_double = ln(2) / b
Half-life (b < 0): t½ = −ln(2) / b = ln(2) / |b|
Prediction: ŷ = a · e^(bx) evaluated at any chosen X.
📖 How to Use This Calculator
📝 Example Calculations
Example 1 - Bacterial Growth
Time (hours): 0, 1, 2, 3, 4, 5. Colony count (×10³): 2, 5.5, 14.8, 40, 109, 298.
ln(Y): 0.693, 1.705, 2.695, 3.689, 4.691, 5.697. Plotting ln(Y) vs X gives a nearly perfect straight line.
Slope b ≈ 1.001, intercept ln(a) ≈ 0.692, so a ≈ e^0.692 ≈ 1.998 ≈ 2.0.
Equation: ŷ = 2.0 · e^(1.001x). R² ≈ 0.9999. Doubling time = 0.693/1.001 ≈ 0.69 hours (41 minutes).
Example 2 - Radioactive Decay
Time (years): 0, 1000, 2000, 3000, 4000, 5000. Activity (dps): 1000, 884, 781, 691, 611, 540.
Linear regression on (t, ln(Activity)) gives b ≈ −0.0001209, a ≈ 1001.
Equation: ŷ = 1001 · e^(−0.0001209t). R² ≈ 0.9999.
Half-life = 0.693/0.0001209 ≈ 5,730 years - consistent with Carbon-14's known half-life.
Example 3 - Compound Interest
Year: 0, 5, 10, 15, 20. Investment value (£): 10000, 16105, 25937, 41772, 67275.
b ≈ 0.09531 (≈ ln(1.10)), a ≈ 10,000. Equation: ŷ = 10000 · e^(0.09531t).
Growth rate per year = e^0.09531 − 1 = 10% - consistent with a 10% annual compound rate. R² = 1.000.
Prediction at year 25: ŷ = 10000 · e^(0.09531×25) = 10000 · e^2.383 ≈ £108,347.
Example 4 - Early Epidemic Spread
Day: 0, 5, 10, 15, 20, 25. Confirmed cases: 50, 130, 340, 890, 2300, 6000.
b ≈ 0.2522, a ≈ 50. Equation: ŷ = 50 · e^(0.2522t). R² ≈ 0.9997.
Doubling time = 0.693/0.2522 ≈ 2.75 days. Growth rate ≈ 28.7% per day during early spread phase.
Prediction at day 30: ŷ = 50 · e^(7.566) ≈ 94,900 cases (assuming no interventions).
Example 5 - Drug Concentration Decay
Time (hours): 0, 2, 4, 6, 8, 10. Plasma concentration (ng/mL): 500, 310, 192, 119, 74, 46.
b ≈ −0.2390, a ≈ 500. Equation: ŷ = 500 · e^(−0.2390t). R² ≈ 0.9998.
Half-life = 0.693/0.2390 ≈ 2.90 hours. At t = 12 h: ŷ = 500 · e^(−2.868) ≈ 28.3 ng/mL.