Updated Regression & Curve Fitting

Exponential Regression Calculator

Fit an exponential curve of the form \(y = a e^{bx}\) to your data, compute regression parameters, R² and residual summaries, predict new values, and interpret growth or decay rates using a log-linear least squares method.

Fit \(y = a e^{bx}\) Log-Linear Least Squares R² & Residuals Growth & Decay Metrics

Fit an Exponential Curve, Predict Values & Analyze Growth

This Exponential Regression Calculator fits the model \[ y = a e^{b x} \] using a standard log-linear least squares approach. It works with strictly positive \(y\)-values, computes the parameters \(a\) and \(b\), reports \(R^2\), provides predictions for new \(x\) values, shows the underlying log-linear regression and converts the parameter \(b\) into growth or decay metrics such as per-unit growth rate, doubling time and half-life.

Enter paired data \((x_i, y_i)\) with all \(y_i > 0\). The calculator fits the model \(y = a e^{b x}\) by applying linear regression to the transformed data \(\ln(y) = \ln(a) + b x\).

Use commas, spaces or line breaks to separate values. The lists of \(x\) and \(y\) must have the same length, with at least two data points and all \(y\)-values strictly positive.

Use this tab to predict \(y\) for a new value of \(x\) using the exponential model fitted from the data in the first tab. The calculator recomputes the regression from the same \(x\) and \(y\) lists each time.

Make sure the \(x\) and \(y\) data fields in the Exponential Regression tab are filled in correctly. This tab uses the same data to estimate \(a\) and \(b\) before computing the prediction.

This tab shows the details of the log-linear regression used to fit the exponential model. It applies linear regression to the transformed data \[ z_i = \ln(y_i), \quad z_i = \ln(a) + b x_i. \]

The same \(x\) and \(y\) inputs from the first tab are used. Re-run the main regression if you change the data.

For the exponential model \[ y = a e^{b x}, \] the parameter \(b\) can be interpreted as a continuous growth (or decay) rate per unit of \(x\). The multiplicative factor per unit is \(e^{b}\). From this we can derive: \[ r = e^{b} - 1 \quad \text{(per-unit growth rate)}, \] \[ T_2 = \frac{\ln 2}{b} \quad \text{(doubling time, if } b > 0\text{)}, \] \[ T_{1/2} = \frac{\ln(1/2)}{b} = \frac{\ln 2}{|b|} \quad \text{(half-life, if } b < 0\text{)}. \]

This tab uses the same regression fit as the first tab. It is most meaningful when the exponential model is a good description of the data (for example when \(R^2\) is reasonably high).

Exponential Regression Calculator – Complete Guide to Fitting \(y = a e^{bx}\)

The Exponential Regression Calculator on MyTimeCalculator fits models of the form \[ y = a e^{b x}, \] where \(a > 0\) and \(b\) is a real number controlling growth or decay. This type of model is widely used to describe processes where changes occur at rates proportional to the current level, such as population growth, compound interest, radioactive decay and certain learning or cooling curves.

To estimate \(a\) and \(b\), the calculator uses a standard log-linear least squares method: it takes natural logarithms of the \(y\)-values and then performs ordinary linear regression on the transformed data. Because \(\ln(y)\) is only defined for \(y > 0\), the tool requires all input \(y\)-values to be strictly positive.

1. Log-Linear Method for Exponential Regression

Starting from the model \[ y = a e^{b x}, \] take natural logarithms of both sides to obtain

\[ \ln(y) = \ln(a) + b x. \]

If we define \(z = \ln(y)\), the relationship becomes a simple linear model: \[ z = \beta_0 + \beta_1 x, \] where \(\beta_0 = \ln(a)\) and \(\beta_1 = b\). The calculator then applies ordinary least squares (OLS) to the pairs \((x_i, z_i)\), where \(z_i = \ln(y_i)\).

For a sample of \(n\) data points, let \(\bar{x}\) and \(\bar{z}\) be the sample means of \(x_i\) and \(z_i\). The least squares formulas are:

\[ b = \beta_1 = \frac{\sum_{i=1}^{n} (x_i - \bar{x})(z_i - \bar{z})}{\sum_{i=1}^{n} (x_i - \bar{x})^2}, \] \[ \ln(a) = \beta_0 = \bar{z} - b \bar{x}, \] \[ a = e^{\ln(a)}. \]

Once \(a\) and \(b\) are obtained, the fitted curve is \[ \hat{y}_i = a e^{b x_i}. \] The calculator displays both the regression equation and numerical values for \(a\) and \(b\).

2. Measuring Fit Quality with R²

Because the regression is performed on the transformed response \(z = \ln(y)\), the most natural measure of fit is the coefficient of determination \(R^2\) in log space. With fitted values \(\hat{z}_i = \ln(a) + b x_i\), the residual sum of squares and total sum of squares are:

\[ \text{SSE}_{\log} = \sum_{i=1}^{n} (z_i - \hat{z}_i)^2, \quad \text{SST}_{\log} = \sum_{i=1}^{n} (z_i - \bar{z})^2, \] \[ R^2_{\log} = 1 - \frac{\text{SSE}_{\log}}{\text{SST}_{\log}}. \]

The calculator reports \(R^2_{\log}\) as the primary goodness-of-fit measure, since it reflects how well the log-transformed data are explained by the linear model. It also computes an \(R^2\) measure on the original scale of \(y\) by comparing \(y_i\) to \(\hat{y}_i\), which can be useful for direct interpretation in the original units.

3. Interpreting the Parameters \(a\) and \(b\)

In the exponential model \[ y = a e^{b x}, \] the parameter \(a\) is the value of the model at \(x = 0\), since \[ y(0) = a e^{b \cdot 0} = a. \]

The parameter \(b\) controls the growth or decay rate. A convenient way to interpret it is via the per-unit multiplicative factor:

\[ \text{factor per unit of } x = e^{b}, \] \[ r = e^{b} - 1, \]

where \(r\) can be viewed as the proportional growth rate per unit of \(x\). For example, if \(e^{b} = 1.05\), then \(r = 0.05\) corresponds to a 5% increase per unit of \(x\).

4. Doubling Time and Half-Life

When the exponential model describes growth, a common summary is the doubling time, the value \(T_2\) such that the model doubles: \[ y(x + T_2) = 2 y(x). \] Substituting the model gives \[ a e^{b (x + T_2)} = 2 a e^{b x}, \] which simplifies to \[ e^{b T_2} = 2 \quad \Rightarrow \quad T_2 = \frac{\ln 2}{b}, \] provided \(b > 0\).

For decay processes where \(b < 0\), we often use the half-life \(T_{1/2}\), the value such that \[ y(x + T_{1/2}) = \tfrac{1}{2} y(x). \] The same steps yield \[ e^{b T_{1/2}} = \tfrac{1}{2} \quad \Rightarrow \quad T_{1/2} = \frac{\ln(1/2)}{b} = \frac{\ln 2}{|b|}. \]

The Growth & Decay Parameters tab of the calculator uses these formulas to translate the fitted value of \(b\) into per-unit growth rates and characteristic times.

5. How to Use the Exponential Regression Calculator

  1. Enter your data: go to the Exponential Regression tab, paste the lists of \(x\)-values and \(y\)-values and ensure all \(y_i > 0\). The tool does not log-transform or fit points with non-positive \(y\)-values, as \(\ln(y)\) would be undefined or invalid.
  2. Run the regression: click the compute button to obtain \(a\), \(b\), both versions of \(R^2\) and a table of fitted values and residuals.
  3. Make predictions: on the Predict y for x tab, enter a new \(x\) value. The calculator refits the model using the same data (if necessary) and returns the corresponding prediction \(\hat{y} = a e^{b x}\).
  4. Inspect the log-linear regression: the Log-Linear Method tab shows the fitted line for \(\ln(y)\) versus \(x\), including the intercept \(\ln(a)\), slope \(b\), means and sum-of-squares quantities.
  5. Analyze growth or decay: the Growth & Decay Parameters tab converts \(b\) into per-unit growth rate \(r = e^{b} - 1\), doubling time (when \(b > 0\)) and half-life (when \(b < 0\)).

6. When Is an Exponential Model Appropriate?

Exponential models are most appropriate when changes occur at rates proportional to the current level. Some indicators that an exponential model may fit well include:

  • Straight-line patterns when plotting \(\ln(y)\) versus \(x\).
  • Roughly constant percentage changes per unit of \(x\).
  • Processes known to follow multiplicative dynamics, such as compound growth or radioactive decay.

If \(R^2\) is low or residuals show systematic patterns, a different model (for example polynomial, logistic or power-law) may describe the data better. The exponential regression calculator is best viewed as a quick way to fit and interpret the classical \(y = a e^{b x}\) form rather than as a full curve-selection tool.

Related Tools from MyTimeCalculator

Exponential Regression Calculator FAQs

Frequently Asked Questions

Quick answers to common questions about fitting exponential curves, log-linear regression and interpreting growth or decay from the model parameters.

The calculator fits the model \(y = a e^{b x}\) by taking natural logarithms and applying linear regression to \(\ln(y)\). Since \(\ln(y)\) is only defined for \(y > 0\), any non-positive values would make the transformation invalid. To keep the method mathematically correct and the interpretation clear, the tool requires all \(y\)-values to be strictly positive and shows an alert otherwise.

The parameter \(b\) is a continuous growth or decay rate per unit of \(x\). The multiplicative factor per unit is \(e^{b}\), and the proportional growth rate is \(r = e^{b} - 1\). If \(b > 0\), \(y\) grows exponentially as \(x\) increases; if \(b < 0\), \(y\) decays exponentially. The calculator converts \(b\) into intuitive metrics such as doubling time or half-life when applicable.

The primary regression is performed on the transformed data \(\ln(y)\) versus \(x\), so the most natural goodness-of-fit measure is \(R^2\) in log space, based on how well the model explains variation in \(\ln(y)\). The calculator labels this as “R² (Log Space)”. It also computes an additional “R² (Original Scale)” based on the fitted values \(\hat{y} = a e^{b x}\) and the original \(y\)-values to give a sense of fit in the original units. Both values can be useful, but they answer slightly different questions about the fit.

Yes, the Predict y for x tab allows you to plug in new \(x\) values and obtain predicted \(y\) values using the fitted model. However, like all regression-based forecasts, reliability decreases as you move farther away from the range of the original data. It is usually safer to interpolate within the observed range of \(x\) than to extrapolate far beyond it, especially if you are unsure that the exponential pattern continues indefinitely.

If \(R^2\) is low or residuals show systematic patterns, the exponential model may not be appropriate. In that case, you could try alternative models such as linear, polynomial, power-law or logistic curves, depending on the context. Visualizing your data, checking the \(\ln(y)\) versus \(x\) plot and comparing fits from different models can help you choose a better representation of the underlying relationship.