Exponential Regression Calculator

Fit an exponential growth or decay curve to your data and get the equation, R², and predictions instantly.

e Exponential Regression Calculator
Coefficient a
-
Coefficient b
-
R² (R-squared)
-
Growth/Decay %
-
Doubling / Half-life
-
Data Points (n)
-

📖 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

ŷ = a · e^(bx)

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

1
Enter the X values (independent variable) as comma-separated numbers. X can be any real number - it does not need to be positive.
2
Enter the Y values. All Y values must be strictly positive (greater than zero). Zero or negative Y values will cause an error.
3
Click Calculate Exponential Regression. The results show a, b, R², the growth/decay rate per unit, the doubling time or half-life, and the full equation.
4
Use the Prediction field to evaluate ŷ = a·e^(bx) at any X - for example, to forecast future values.

📝 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).

Result = ŷ = 2.0 · e^(1.001x), R² ≈ 0.9999
Try this example →

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.

Result = ŷ = 1001 · e^(−0.0001209t), Half-life ≈ 5,730 years
Try this example →

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.

Result = ŷ = 10000 · e^(0.09531t), Growth rate = 10%/yr
Try this example →

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).

Result = ŷ = 50 · e^(0.2522t), Doubling time ≈ 2.75 days
Try this example →

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.

Result = ŷ = 500 · e^(−0.2390t), Half-life ≈ 2.90 hours
Try this example →

❓ Frequently Asked Questions

What is exponential regression?+
Exponential regression fits the model y = a·e^(bx) to a set of data points, where e is Euler's number (≈ 2.71828). It is used when the relationship between X and Y is multiplicative rather than additive - that is, each unit increase in X multiplies Y by a constant factor e^b. This is the mathematical signature of processes like population growth, radioactive decay, compound interest, and viral spread.
How is exponential regression calculated?+
The method uses log-linearisation: taking the natural log of both sides gives ln(y) = ln(a) + bx, which is a linear equation in X with intercept ln(a) and slope b. Standard linear least-squares regression is then applied to the pairs (xᵢ, ln(yᵢ)) to find slope b and intercept ln(a). The coefficient a is recovered as a = e^(intercept). This approach requires all Y values to be strictly positive.
What does the b coefficient mean?+
The coefficient b is the continuous growth rate. If b > 0, the model describes exponential growth - Y increases by a factor of e^b for each unit increase in X. If b < 0, the model describes exponential decay. For example, b = 0.693 corresponds to a doubling every unit (since e^0.693 ≈ 2). In percentage terms, the approximate growth rate per unit is (e^b − 1) × 100%.
What does the a coefficient mean?+
The coefficient a is the predicted Y value when X = 0 (the intercept of the exponential curve). For example, if X is time in hours and Y is bacterial count, a represents the initial population at time zero. Note that a must be positive for a valid exponential model.
What is R-squared in exponential regression?+
R² measures the proportion of variance in the original Y values explained by the fitted exponential model: R² = 1 − SS_res/SS_tot where SS_res = Σ(yᵢ − ŷᵢ)² and SS_tot = Σ(yᵢ − ȳ)². This calculator computes R² on the original (untransformed) scale. The log-space R² from the linear regression step is also used internally but the displayed R² gives a more intuitive measure of how well the curve fits the raw data.
What is the half-life in exponential decay?+
For a decay model y = a·e^(bx) with b < 0, the half-life t½ is the time for Y to fall to half its initial value: t½ = −ln(2)/b = 0.693/|b|. For example, Carbon-14 has a decay constant b ≈ −1.21 × 10⁻⁴ per year, giving t½ = 0.693/0.000121 ≈ 5,730 years. Similarly, the doubling time for growth is t_double = ln(2)/b.
When is exponential regression appropriate?+
Use exponential regression when: (1) a scatter plot of X vs Y shows a curve that steepens as X increases (growth) or flattens toward zero (decay); (2) a scatter plot of X vs ln(Y) shows an approximately straight line; (3) the underlying process is multiplicative (e.g. compound interest, cell division, radioactive decay). If ln(Y) vs X is curved, a different model (quadratic or polynomial regression) may be more appropriate.
What are the limitations of log-linearised exponential regression?+
Log-linearisation minimises the sum of squared residuals on the log scale, which implicitly weights smaller Y values more heavily than larger ones. This can bias the fit for data where large-Y observations are most important. For critical applications, non-linear least squares (NLS) on the original scale is preferred. Additionally, if any Y ≤ 0, the logarithm is undefined and the method cannot be applied directly.