Exponential Regression Calculator
Test cases replayed : 2 of 2 match · Methodology · No outside source listed
Enter up to six (x, y) points with positive y values. The calculator fits the exponential curve through them, gives the growth or decay rate per unit of x and predicts y at a new x.
Result
Fitted model
Initial value a (y at x = 0)
- Continuous rate b (per unit of x)
- Growth factor eᵇ, so y = a·(eᵇ)ˣ
- Change in y per unit of x (%)
- r² of the fit of ln y on x
- Predicted y at that x
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- Number of points used: choose 3 points, 4 points, 5 points or 6 points.
- x₁: enter a number.
- y₁ (positive): enter a number.
- x₂: enter a number.
- y₂ (positive): enter a number.
- x₃: enter a number.
- y₃ (positive): enter a number.
- x₄: enter a number.
- y₄ (positive): enter a number.
- x₅: enter a number.
- y₅ (positive): enter a number.
- x₆: enter a number.
- y₆ (positive): enter a number.
- x value to predict y for: enter a number.
- Read the result: Fitted model; the panel also shows Initial value a (y at x = 0), Continuous rate b (per unit of x), Growth factor eᵇ, so y = a·(eᵇ)ˣ, Change in y per unit of x (%), r² of the fit of ln y on x and Predicted y at that x.
How this calculator works
Taking logarithms turns y = a·e^(bx) into ln y = ln a + b x, a straight line. Ordinary least squares on the points (x, ln y) gives b = (nΣx ln y − Σx Σln y) ÷ (nΣx² − (Σx)²) and ln a = (Σln y − bΣx) ÷ n. This is the usual exponential regression of graphing calculators and spreadsheets (Excel LOGEST and GROWTH).
Growth factor = eᵇ; the model can also be written y = a·(eᵇ)ˣ. A negative b is exponential decay. r² measures the fit of the straight line to (x, ln y).
Every y must be positive, since ln y is undefined otherwise; results show — when one is not. The fit minimizes errors in ln y, not in y, so it gives relatively more weight to small y values than a nonlinear fit would.
Worked example
| Number of points used | 6 points |
|---|---|
| x₁ | 0 |
| y₁ (positive) | 3 |
| x₂ | 1 |
| y₂ (positive) | 6 |
| x₃ | 2 |
| y₃ (positive) | 12 |
| x₄ | 3 |
| y₄ (positive) | 24 |
| x₅ | 4 |
| y₅ (positive) | 48 |
| x₆ | 5 |
| y₆ (positive) | 96 |
| x value to predict y for | 6 |
| Fitted model | y = 3 · e^(0.6931x) |
|---|---|
| Initial value a (y at x = 0) | 3 |
| Continuous rate b (per unit of x) | 0.6931 |
| Growth factor eᵇ, so y = a·(eᵇ)ˣ | 2 |
| Change in y per unit of x (%) | 100% |
| r² of the fit of ln y on x | 1 |
| Predicted y at that x | 192 |
Frequently asked questions
How do I get an exponential equation from a table?
Enter the table's x and y pairs. With 3, 6, 12, 24, 48, 96 at x = 0 to 5, the fit is exactly y = 3·e^(0.6931x) = 3·2ˣ.
Why does my result differ slightly from a nonlinear fit?
Fitting ln y by least squares and fitting y directly minimize different errors, so on noisy data the coefficients differ a little. Both are standard; this is the linearized method.
Can I fit decay data?
Yes. Decreasing positive y values give a negative b and a growth factor below 1.