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
Example 2 - Radioactive Decay
Example 3 - Compound Interest
Example 4 - Early Epidemic Spread
Example 5 - Drug Concentration Decay
❓ Frequently Asked Questions
🔗 Related Calculators
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.