This free exponential regression calculator fits the curve y = a·ebx to your data and returns the equation, the growth factor, the percentage growth rate, the doubling time or half-life, R², a chart and predictions. Enter your X and Y values below.
Show fitted values and residuals
| x | y | ŷ (fitted) | residual |
|---|
What is an exponential regression calculator?
An exponential regression calculator finds the curve \( y = a\,e^{bx} \) that best fits a set of points whose values grow (or shrink) by a roughly constant percentage each step. Straight lines model constant amounts of change; exponential curves model constant rates of change, which is why they describe compound interest, population growth, viral spread, radioactive decay and the cooling of a hot drink.
Paste your X and Y values into the boxes above and press Run regression. The calculator returns the fitted equation in both common forms, the growth factor, the percentage growth per unit of x, the doubling time (or half-life), R², a chart of the fitted curve, a residual table and a prediction box. Everything runs in your browser, so your data never leaves your computer.
The exponential regression formula
The model has two parameters. a is the starting value (the predicted y when x = 0) and b is the continuous growth rate. Writing \( B = e^{b} \) gives the equivalent form \( y = a\,B^{x} \), where B is the growth factor per unit of x. A factor of 1.25 means each step multiplies y by 1.25, a 25% increase; a factor of 0.8 means a 20% decrease.
The trick behind every exponential regression calculator is that taking the natural logarithm turns the curve into a straight line:
\[ \ln y = \ln a + b\,x \]
So the calculator runs ordinary least squares on the pairs \( (x, \ln y) \), exactly the method used by our linear regression calculator, then converts back:
\[ b = \frac{\sum (x_i-\bar x)(\ln y_i-\overline{\ln y})}{\sum (x_i-\bar x)^2}, \qquad a = e^{\,\overline{\ln y} – b\,\bar x} \]
Because it needs \( \ln y \), every Y value must be greater than zero. If your data has zeros or negatives, an exponential model is the wrong shape anyway; try the quadratic regression calculator or a straight line instead.
How to use the exponential regression calculator
- Enter X values: time, step number, dose, or any predictor. Separate them with commas, spaces or new lines.
- Enter Y values in the same order. Every Y must be positive.
- Press Run regression. Read the equation, the growth factor and R².
- Check the residuals. Open the residual table: if the errors swing from positive to negative in a pattern, the data is not truly exponential.
- Predict. Type a new x into the prediction box. Be careful extrapolating far past your data, because exponential curves explode quickly.
Worked example: growth that compounds
The example data, \( y = 2.0, 2.9, 4.1, 6.0, 8.4, 12.3, 17.5, 25.0 \) for \( x = 0 \) to \( 7 \), roughly multiplies by 1.4 each step. The exponential regression calculator returns \( \hat y = 2.01\,e^{0.361x} \), which is the same as \( \hat y = 2.01 \cdot 1.43^{x} \): a 43% increase per step and a doubling time of \( \ln 2 / 0.361 \approx 1.9 \) steps. R² is close to 1, so the curve explains almost all of the variation. A straight line through the same points would miss badly at both ends, which you can confirm by pasting them into the linear model.
Why two R² values?
The fit is done on \( \ln y \), so the standard R², the one reported by a TI-84 and by the exponential trendline in Excel, measures how well the straight line fits the logged data. The status line also shows R² on the original y scale, which tells you how well the curve fits the numbers you actually entered. They usually agree closely; when they do not, a few large y values are dominating. To compare models fairly, look at an error measure in the original units such as RMSE or mean squared error.
Note that some graphing tools fit \( y = a e^{bx} \) directly by non-linear least squares instead of using the log transform. Their a and b can differ slightly from this exponential regression calculator because they weight large y values more heavily. Neither answer is wrong; they minimise different errors.
Exponential vs logarithmic vs quadratic regression
| Shape of your scatter plot | Model | Calculator |
|---|---|---|
| Grows faster and faster (constant % change) | \( y = a e^{bx} \) | Exponential regression calculator (this page) |
| Rises fast, then levels off | \( y = a + b \ln x \) | Logarithmic regression calculator |
| Rises then falls (or falls then rises) | \( y = ax^2 + bx + c \) | Quadratic regression calculator |
| Constant amount of change | \( y = a + bx \) | Linear regression calculator |
| S-shaped, growth that saturates at a ceiling | \( p = 1/(1+e^{-z}) \) | Logistic regression calculator |
Real growth rarely stays exponential forever: populations hit resource limits and a viral post runs out of new viewers. When the curve bends over and flattens, the sigmoid (logistic) curve is usually the better description.
Exponential regression in machine learning
The log trick in this calculator is one of the most useful ideas in practical machine learning. Skewed features such as income, house prices or page views often become far easier to model after a log transform, a standard step in feature engineering. Fitting \( \ln y \) with a linear model is exactly what an exponential regression calculator does, and it is also how analysts model compounding quantities inside larger linear regression models. Keep two warnings in mind: a few outliers can drag an exponential fit a long way, and a curve that fits past data perfectly can still forecast terribly, the same trap described in our guide to overfitting and underfitting.
For the theory behind least squares and curve fitting, see exponential growth on Wikipedia.
Frequently asked questions
What is the equation for exponential regression? It is \( y = a e^{bx} \), or equivalently \( y = a B^x \) with \( B = e^b \). The exponential regression calculator estimates a and b by least squares on \( \ln y \).
Can Y be zero or negative? No. The method takes \( \ln y \), which only exists for positive numbers. Shift the data or choose another model.
How do I find the growth rate as a percentage? Compute \( (e^{b} – 1) \times 100\% \). The calculator shows it as “Growth per unit x”. A negative value means decay.
How do I get the doubling time or half-life? Divide \( \ln 2 \approx 0.693 \) by \( |b| \). For growth it is the doubling time; for decay it is the half-life.
Why does my answer differ from Desmos? Desmos may fit the curve directly, while this calculator, the TI-84 and Excel use the log-linear method. Both are valid; they minimise different errors.