standarddeviationcalculator.net SD Calculator

Exponential regression calculator

Share this page

Favorites

    No favorites yet. Press Favorite on any page to keep it here.

    Methodology

    Fit an exponential growth or decay curve to paired data. The calculator takes logs, fits a straight line, and transforms back to give y = a·e^(bx), the equivalent y = a·b^x, the percentage growth rate and a prediction.

    Paired data (y must be positive)
    xyRemove
    x = 8 is outside the data range (0 to 6); exponential extrapolation grows or shrinks fast, so treat it with caution.

    Exponential equation ŷ = 100.17 · e^(0.2646x)
    Predicted ŷ at x = 8831.918
    Other formŷ = 100.17 · 1.3029^x
    Growth per unit of x30.29%
    Doubling time2.62 units of x
    R² (on ln y)0.99988
    R² (on y)0.99992
    p-value of b< 0.0001
    012345678200400600800 x = 8 x y

    ━ Data   ━ ŷ = 100.17 · e^(0.2646x)

    The log transform and the fitted values
    xyln yŷy − ŷ
    01004.60517100.174−0.17431
    11304.86753130.518−0.51844
    21725.14749170.0541.9458
    32205.39363221.566−1.5659
    42905.66988288.6811.3189
    53755.92693376.126−1.1264
    64906.19441490.06−0.060041
    Show the working, step by step
    1. Take the natural log of each y. Since ln(a·e^(bx)) = ln a + bx, a straight line through (x, ln y) gives the curve.

      mean of x = 3, mean of ln y = 5.40072

    2. Least-squares slope and intercept of ln y on x.

      b = Σ(x − x̄)(ln y − mean) ÷ Σ(x − x̄)² = 7.40888 ÷ 28 = 0.264603 ln a = 5.40072 − 0.264603 × 3 = 4.60691

    3. Transform back.

      a = e^(4.60691) = 100.174 growth factor = e^b = e^(0.264603) = 1.30291 ŷ = 100.17 · e^(0.2646x) ŷ = 100.17 · 1.3029^x

    4. How well the line fits on the log scale.

      R² = 0.999884; t for b = 207.16 with 5 df, p < 0.0001

    5. Prediction at x = 8.

      ŷ = 100.174 × e^(0.264603 × 8) = 831.918

    On the log scale this is a very close fit. Because the fit minimises squared errors in ln y, not in y, it weights small y values more heavily than a direct non-linear fit would. The R² on y shows how it does on the original scale.

    Exponential regression: the method

    y = a·e^(bx) ⇒ ln y = ln a + bx b = Σ(x − x̄)(ln y − mean ln y) ÷ Σ(x − x̄)² ln a = mean ln y − b·x̄, growth factor = e^b

    Taking the natural log turns the curve into a straight line in x, so ordinary least squares applies. The slope of that line is b, and its intercept is ln a.

    Exponential regression: a worked example

    The default data are seven counts of a growing population at x = 0 to 6. y = 100, 130, 172, 220, 290, 375, 490. Each value is roughly 1.3 times the one before, which is the mark of exponential growth.

    1. Take logs: ln 100 = 4.605, ln 130 = 4.868, and so on. The mean of ln y is 5.40072 and x̄ = 3.
    2. The slope of ln y on x is b = 7.40888 ÷ 28 = 0.264603.
    3. The intercept is ln a = 5.40072 − 0.264603 × 3 = 4.60691, so a = e^4.60691 = 100.17.
    4. The growth factor is e^0.264603 = 1.3029.

    ŷ = 100.17 · e^(0.2646x) = 100.17 · 1.3029^x

    The population grows by about 30.3% per step in x and doubles every ln 2 ÷ 0.2646 = 2.62 steps. The straight line through (x, ln y) has R² = 0.99988. The default prediction at x = 8 is 100.17 × e^(0.2646 × 8) = 831.9, which the calculator flags because 8 lies beyond the last data point.

    How to read the result

    A positive b means growth and a negative b means decay. The percentage change per unit of x is (e^b − 1) × 100%, not b × 100%. The two are close only when b is small. For b = 0.2646 the true rate is 30.3%, not 26.5%. a is the fitted value at x = 0. If your x values are years such as 2019 to 2025, a is the value in year 0, which is meaningless. Subtract the first year from x first. Check the chart: if the points bend away from the curve at the ends, growth is slowing, and a logistic or polynomial model may fit better.

    Checking that the model suits the data

    The quickest check is to plot ln y against x. If those points fall close to a straight line, the exponential model is right. If they curve, it is not. The residual column in the table gives the same information on the original scale. A run of positive residuals in the middle and negative ones at the ends means the growth is slowing. A steady ratio between successive y values, as in the default data, is the pattern to look for.

    Common mistakes

    • Using log base 10 and then e. If you take log₁₀ y by hand, the slope is log₁₀ of the growth factor, not b. Stick to one base.
    • Reading b as a percentage. The growth rate is e^b − 1.
    • Including zero or negative y values. They cannot be logged, so the fit is impossible.
    • Long-range extrapolation. Real growth rarely stays exponential for long.
    Exponential regression calculator: the worked example on this page, with its result and chart
    Exponential regression calculator: the worked example above, at a glance.

    Common questions

    What is the difference between y = a·e^(bx) and y = a·b^x?

    They are the same curve written two ways. The growth factor per unit of x is e^b in the first form and the base in the second, so the base equals e^b. In the default example b = 0.2646 and e^0.2646 = 1.3029. y grows by 30.29% for each step in x. Calculators such as the TI-84 report the a·b^x form.

    Why must every y be positive?

    The fit works on ln y, and the logarithm of zero or a negative number is undefined. An exponential curve a·e^(bx) with a > 0 is always positive anyway. If your data include zeros, consider adding a constant before fitting, or a different model.

    Why are there two R² values?

    Least squares is done on ln y, so the natural R² is the one for the straight line through (x, ln y). The calculator also reports 1 − SSE/SST on the original y scale using the fitted curve, which tells you how close the curve comes to the raw values. For well-behaved growth data the two are close, as in the default (0.99988 and 0.99992).

    Is this the same answer as a non-linear least-squares fit?

    Close but not identical. Fitting on the log scale minimises relative (percentage) errors, which gives small y values more weight. A direct non-linear fit minimises errors in y itself and weights the large values more. The log-linear fit is the standard textbook and graphing-calculator method.

    How do I get the doubling time or half-life?

    Doubling time = ln 2 ÷ b when b is positive. Half-life = ln 2 ÷ |b| when b is negative. The calculator shows whichever applies. For the default data, ln 2 ÷ 0.2646 = 2.62 units of x.