# What is my exponential regression?

Fits an exponential curve y = a e^(kx) = a bˣ to paired x and y values by least squares on ln y, with the growth factor, r² and a prediction, and draws the curve.

- Page: https://www.acalculator.org/statistics/exponential-regression-calculator
- JSON spec: https://www.acalculator.org/statistics/exponential-regression-calculator.json
- Version: 7eaf228a59ac

## Default answer

Example with the default inputs (x values [0, 1, 2, 3, 4, 5], y values [3.1, 4.6, 6.4, 9.8, 14.2, 21.5], New x value 6): The exponential regression through 6 points is y = 3.07284 × 1.47028ˣ.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| x | x values | The x values, in order, separated by commas, spaces, semicolons, or new lines. |
| y | y values | The y values, one for each x value, in the same order. Each must be greater than 0. |
| at | New x value | An x value at which to read y from the fitted curve. Leave empty to skip. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| equation | Exponential regression equation | y = a × bˣ, with a and b to 6 significant digits. |
| natural | Same curve with e | y = a e^(kx), with k = ln b. |
| a | Initial value (a) | The value of y on the curve at x = 0. |
| b | Growth factor (b) | The factor y is multiplied by when x goes up by 1; below 1 means decay. |
| k | Continuous rate (k) | The slope of ln y against x: k = ln b. |
| rate | Change per unit of x | (b − 1) × 100: the percent growth (or decay, when negative) for each step of 1 in x. |
| r2 | r² (of ln y on x) | The share of the variation in ln y that the straight-line fit explains. Not shown when every y is the same. |
| predicted | Predicted y | a × b^x at the new x value. |
| lnA | ln a | The intercept of the straight-line fit of ln y on x. |
| n | Number of points (n) | How many (x, y) pairs there are. |

## Method

ln y = ln a + kx by least squares: k = Σ(x − x̄)(ln y − m) ÷ Σ(x − x̄)², ln a = m − k x̄, b = eᵏ.

## Assumptions

- Every y is greater than 0, because the fit uses ln y.
- The fit minimises squared errors in ln y, not in y, as graphing calculators’ ExpReg does; a direct nonlinear fit in y gives slightly different a and b.
- r² is for the straight line through (x, ln y).

## Worked examples

1. x = 0 or 0.01, y = 1 or 1.03 gives equation = y = 0.583048 × (2.2072 × 10¹⁰)ˣ, a = 0.583048, b = 22,072,021,331.43789, k = 23.817577, r2 = 0.971221. Source: OpenStax, Algebra and Trigonometry 2e, §6.8 Fitting Exponential Models to Data, Example 1 (blood alcohol and crash risk: y = 0.58304829 × (2.20720213 × 10¹⁰)ˣ, r² ≈ 0.97), https://openstax.org/books/algebra-and-trigonometry-2e/pages/6-8-fitting-exponential-models-to-data (retrieved 2026-10-02); NIST/SEMATECH e-Handbook of Statistical Methods, §4.6.2.4 Transformations to Improve Fit and Equalize Variances (the ln transformation), https://www.itl.nist.gov/div898/handbook/pmd/section6/pmd624.htm (retrieved 2026-10-02).
2. x = 0 or 1, y = 3 or 6, at = 4 gives equation = y = 3 × 2ˣ, natural = y = 3 e^(0.693147x), a = 3, b = 2, k = 0.693147, rate = 100%, r2 = 1, predicted = 48. Source: NIST/SEMATECH e-Handbook of Statistical Methods, §4.6.2.4 Transformations to Improve Fit and Equalize Variances (the ln transformation), https://www.itl.nist.gov/div898/handbook/pmd/section6/pmd624.htm (retrieved 2026-10-02).
3. x = 1 or 2, y = 2.7 or 7.4, at = 6 gives a = 0.995527, k = 1.001187, b = 2.721511, predicted = 404.495762. Source: OpenStax, Algebra and Trigonometry 2e, §6.8 Fitting Exponential Models to Data, Example 1 (blood alcohol and crash risk: y = 0.58304829 × (2.20720213 × 10¹⁰)ˣ, r² ≈ 0.97), https://openstax.org/books/algebra-and-trigonometry-2e/pages/6-8-fitting-exponential-models-to-data (retrieved 2026-10-02).

## FAQ

### How does exponential regression work?

Taking the natural log turns y = a × bˣ into a straight line, ln y = ln a + x ln b. The calculator fits that line by least squares, then turns back: a = e^(intercept) and b = e^(slope).

### Why must every y be greater than 0?

The fit uses ln y, and the logarithm of 0 or a negative number is not a real number. An exponential curve a × bˣ with a > 0 never reaches 0 either, so data with zeros or negatives need a different model.

### What is the difference between b and k?

They describe the same curve. b is the growth factor per step of 1 in x (y = a × bˣ); k = ln b is the continuous rate (y = a e^(kx)). With b = 2 the values double each step, and k = 0.693147.

### Does this give the same answer as my graphing calculator?

Yes, for ExpReg on a TI-83/84, which also fits ln y. For OpenStax’s blood alcohol data it gives y = 0.583048 × (2.2072 × 10¹⁰)ˣ, as in the book. Spreadsheet trendlines also use the log fit.

### What does r² mean here?

It is r² for the straight line through the points (x, ln y): the share of the variation in ln y that the line explains. Values close to 1 mean the points lie close to an exponential curve.

### Is the log fit the best fit in y?

Not exactly. It minimises squared errors in ln y, which gives small y values relatively more weight. A direct nonlinear least-squares fit in y gives slightly different a and b; the log fit is the standard, closed-form method.

### How do I read the percent change per step?

(b − 1) × 100. b = 1.08 means 8% growth for each step of 1 in x; b = 0.9 means a 10% decay.

## Sources

- OpenStax, Algebra and Trigonometry 2e, §6.8 Fitting Exponential Models to Data (exponential regression with ExpReg; Example 1, blood alcohol content and relative crash risk, y = 0.58304829 (2.20720213 × 10¹⁰)ˣ with r² ≈ 0.97). https://openstax.org/books/algebra-and-trigonometry-2e/pages/6-8-fitting-exponential-models-to-data (retrieved 2026-10-02)
- NIST/SEMATECH e-Handbook of Statistical Methods, §4.6.2.4 Transformations to Improve Fit and Equalize Variances (ln transformations to linearize a fit). https://www.itl.nist.gov/div898/handbook/pmd/section6/pmd624.htm (retrieved 2026-10-02)
- NIST/SEMATECH e-Handbook of Statistical Methods, §4.1.4.1 Linear Least Squares Regression. https://www.itl.nist.gov/div898/handbook/pmd/section1/pmd141.htm (retrieved 2026-10-02)
