Exponential Regression Calculator

Fit an exponential curve to your data using the least squares method. Get equation, R², and a clear graph.

Method: Linearization by taking natural log of y, then ordinary least squares. Equivalent to minimizing sum of squared residuals on log scale.

x y
Bacterial growth (0,10),(1,20),(2,40),(3,80)
Radioactive decay (0,100),(1,75),(2,56),(3,42)
Simple test (0,1),(1,2.7),(2,7.4),(3,20)

Understanding Exponential Regression

Exponential regression models data that grows or decays at a constant relative rate. It is widely used in science, finance, and engineering to describe processes like population growth, radioactive decay, and compound interest.

Model Forms

The standard exponential model is:

y = a · eb·x

where a is the initial value (when x = 0) and b is the growth (b>0) or decay (b<0) rate.

An equivalent form often used in finance is:

y = a · (eb)x = a · rx with r = eb

Here r is the growth factor per unit x (e.g., if x is time in years, r = 1 + interest rate).

Mathematical Derivation

1
Take the natural logarithm of both sides:
ln(y) = ln(a) + b·x
2
This is now a linear relationship: Y = A + b·x where Y = ln(y) and A = ln(a).
3
Apply ordinary least squares (OLS) to the transformed data (x, ln(y)) to estimate A and b.
4
Transform back: a = eA, b remains the same.

Interpretation of Parameters

  • a: The fitted value at x = 0. It may not equal the first data point if the model is not forced through it.
  • b: The instantaneous rate of change. For a small Δx, the relative change in y is approximately b·Δx. Specifically, the derivative dy/dx = b·y.
  • r = eb: The factor by which y multiplies when x increases by 1. If r > 1, growth; if 0 < r < 1, decay.

Goodness of Fit: R² (Coefficient of Determination)

In exponential regression, R² is computed on the original y-values (not the log-transformed ones) to reflect how well the curve fits the actual data:

R² = 1 - SSres / SStot

SSres = Σ (yi - ŷi)² (sum of squared residuals in original units)

SStot = Σ (yi - ȳ)² (total sum of squares around the mean)

R² ranges from 0 to 1, with values close to 1 indicating a very good fit. Caution: R² from log-transformed regression can be misleading; we always report back-transformed R².

Assumptions & Diagnostics

For valid inference, the exponential regression via log transformation assumes:

  • Positivity: All y-values must be strictly positive (since ln(y) must be defined).
  • Homoscedasticity: The variance of the errors in the log scale is constant. This translates to relative constant variance in the original scale.
  • Normality: Errors in the log scale are normally distributed (for confidence intervals).

After fitting, you can examine a residual plot (residuals vs. fitted values) to check these assumptions. A funnel shape in the original residuals suggests heteroscedasticity.

Applications & Examples

Biology

Bacterial growth: N(t) = N₀·ekt. Doubling time = ln(2)/k.

Physics

Radioactive decay: N(t) = N₀·e-λt. Half-life = ln(2)/λ.

Finance

Compound interest: A = P·ert (continuous compounding).

Medicine

Drug concentration in bloodstream often follows exponential decay after administration.

Limitations & Alternatives

  • If your data contains zeros or negative y, exponential regression is not applicable. Consider linear or polynomial regression.
  • When the range of y is large, the log transformation may overemphasize small values. Weighted least squares can be used as an alternative.
  • For data that levels off (sigmoidal shape), logistic regression is more appropriate.
Did You Know?

The term "regression" was coined by Francis Galton in the 19th century. Exponential regression became widely used after the development of calculus and the work of mathematicians like Laplace and Gauss on least squares.

Frequently Asked Questions

Exponential regression requires y>0 because ln(y) is undefined otherwise. If you have such data, consider a different model (e.g., linear or polynomial).

They are equivalent: b (in the second form) = e^b (first form). The calculator provides both for convenience.

At least two distinct points are required. More points give a more reliable estimate and allow checking assumptions.

R² can be negative if the model fits worse than a horizontal line (mean). This can happen if the model is mis-specified (e.g., using exponential on non‑exponential data). In our calculator, R² is always between 0 and 1 because we use back-transformed values.