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).
Fit an exponential curve to data points, compute coefficients, equation, R², predictions, residuals, with clear steps and intuitive outputs instantly.
y = a · e^(b·x) (also y = A · B^x where A=a and B=e^b)
ln(y) = ln(a) + b·x, fit a line, then report a = e^(intercept), b = slope.R² is shown in both ln-space and original y-space for transparency.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\).
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.
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. \]
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).
\((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\).
With \(\hat y=5\,e^{0.2x}\), predict at \(x=10\): \(\hat y(10)=5\,e^{2}\approx36.946\).
When changes are proportional to current level (constant percentage growth/decay) rather than constant additive changes.
No. The log transform requires \(y>0\). Consider alternative models or data preprocessing if zeros occur.
Natural log by default. Any log base works, but formulas above assume \(\ln\) for clarity and standardization.
\(\hat b\) is the continuous growth rate per unit \(x\). The percent change per unit is \(e^{\hat b}-1\).
Because least squares is fit to \(\ln y\). It reflects fit in the transformed space consistent with estimation.