Exponential Regression Calculator

Fit an exponential curve to data points, compute coefficients, equation, R², predictions, residuals, with clear steps and intuitive outputs instantly.

Enter at least 3 pairs. Use spaces or commas between x and y; one pair per line. All y must be positive (model is y = a·e^(b·x); we fit ln(y) vs x).

Equation Preview

y = a · e^(b·x)   (also y = A · B^x where A=a and B=e^b)

Helping Notes

  • Only the data pairs are required (x and y). Many calculators use just two columns. :contentReference[oaicite:1]{index=1}
  • We linearize: ln(y) = ln(a) + b·x, fit a line, then report a = e^(intercept), b = slope.
  • Reported is shown in both ln-space and original y-space for transparency.

Results

Fitted Equation

Parameters

Goodness of Fit

What is an Exponential Regression Calculator?

An Exponential Regression Calculator fits a curve of the form \(y=a\,e^{bx}\) to paired data \((x_i,y_i)\) where responses change multiplicatively—common in biology, finance, epidemiology, and physics. Unlike linear regression, which models constant additive change per unit \(x\), exponential regression captures constant relative change (growth if \(b>0\), decay if \(b<0\)). The calculator returns parameter estimates \(\hat a\) and \(\hat b\), goodness-of-fit measures (e.g., \(R^2\) on the log scale), residual diagnostics, and predictions \(\hat y(x)=\hat a\,e^{\hat b x}\). It also reports interpretable summaries: doubling time \(T_2=\ln 2/\hat b\) for growth, half-life \(T_{1/2}=\ln 2/|\hat b|\) for decay, and relative rate \(\hat r = e^{\hat b}-1\) per unit \(x\).

About the Exponential Regression Calculator

Fitting proceeds by linearizing the model with the natural logarithm (valid for \(y_i>0\)). Define \(Y_i=\ln y_i\). Then

\[ Y_i = \ln a + b\,x_i \quad\Longleftrightarrow\quad Y_i = \alpha + b\,x_i,\ \ \alpha=\ln a. \]

Ordinary least squares on \((x_i,Y_i)\) yields closed-form coefficients; back-transform gives \(\hat a=e^{\hat\alpha}\). The tool computes residuals on the log scale \(e_i=Y_i-(\hat\alpha+\hat b x_i)\), sums of squares (SSE, MSE), and \(R^2\). Because log-transform changes the error model, it also provides optional bias-aware back-transformation notes for predictions on the original scale. Inputs with nonpositive \(y\) are flagged, since \(\ln y\) is undefined there; a constant shift cannot be used with pure exponential models.

How to Use this Exponential Regression Calculator

  1. Paste \((x_i,y_i)\) pairs (commas, spaces, or new lines). Ensure all \(y_i>0\).
  2. Press Fit. The calculator estimates \(\hat a,\hat b\), shows linearized fit on \((x,\ln y)\), and reports \(R^2\).
  3. Enter any \(x_0\) to get \(\hat y(x_0)=\hat a\,e^{\hat b x_0}\), with optional confidence/interval summaries (if available).
  4. Review diagnostics and interpret \(\hat b\): growth rate per unit \(x\), doubling time \(T_2=\ln 2/\hat b\), or half-life \(T_{1/2}=\ln 2/|\hat b|\).
  5. Export coefficients, steps, and LaTeX equations for reports or coursework.

Core Formulas (LaTeX)

Model and linearization: \[ y=a\,e^{bx}\quad\Longleftrightarrow\quad \ln y = \ln a + b x. \]

Least-squares on }(x,\ln y){:} \[ \hat b=\frac{n\sum x_i \ln y_i - (\sum x_i)(\sum \ln y_i)}{n\sum x_i^2 - (\sum x_i)^2},\quad \hat a=\exp\!\left(\overline{\ln y}-\hat b\,\bar x\right). \]

Predictions and rates: \[ \hat y(x)=\hat a\,e^{\hat b x},\qquad T_2=\frac{\ln 2}{\hat b}\ ( \hat b>0),\quad T_{1/2}=\frac{\ln 2}{|\hat b|}\ ( \hat b<0). \]

Goodness of fit (log scale): \[ R^2=1-\frac{\sum (\,\ln y_i - (\hat\alpha+\hat b x_i)\,)^2}{\sum (\,\ln y_i-\overline{\ln y}\,)^2},\ \ \hat\alpha=\ln\hat a. \]

Examples (Illustrative)

Example 1 — Growth

Data: \((0,2), (1,3.3), (2,5.4), (3,8.9)\). Fitting \(\ln y\) on \(x\) gives \(\hat b\approx0.5\), \(\hat a\approx2.0\). Model: \(\hat y=2.0\,e^{0.5x}\). Doubling time \(T_2\approx1.386\) (in \(x\)-units).

Example 2 — Decay

\((0,100), (1,60.6), (2,36.8), (3,22.3)\) \(\Rightarrow \hat b\approx-0.5\), \(\hat a\approx100\). Model: \(\hat y=100\,e^{-0.5x}\). Half-life \(T_{1/2}\approx1.386\).

Example 3 — Forecast

With \(\hat y=5\,e^{0.2x}\), predict at \(x=10\): \(\hat y(10)=5\,e^{2}\approx36.946\).

FAQs

When should I use exponential instead of linear regression?

When changes are proportional to current level (constant percentage growth/decay) rather than constant additive changes.

Can I include zero or negative \(y\) values?

No. The log transform requires \(y>0\). Consider alternative models or data preprocessing if zeros occur.

Which base of logarithm is used?

Natural log by default. Any log base works, but formulas above assume \(\ln\) for clarity and standardization.

How do I interpret \(\hat b\)?

\(\hat b\) is the continuous growth rate per unit \(x\). The percent change per unit is \(e^{\hat b}-1\).

Why is \(R^2\) reported on the log scale?

Because least squares is fit to \(\ln y\). It reflects fit in the transformed space consistent with estimation.

More Math & Algebra Calculators