exponentialgrowthcalculator.com

Exponential Regression Calculator

Enter or edit up to 10 (x, y) data points below to fit y = aebx by least squares, with the fitted equation and R² updating as you type.

Exponential regression calculator

Data Points
#xyRemove
1
2
3
4
5
5 of 10 points

 

Fitted Equation y = 9.98 × e^(0.2019x) best-fit curve through the points above
a 9.98 value at x = 0
b 0.2019 continuous growth rate
0.9899 fit quality, on ln(y)

Actual vs. Fitted Values

xActual yFitted ý
0 9.80 9.98
1 12.60 12.21
2 14.50 14.94
3 19.00 18.29
4 21.90 22.38

What the table shows: the five default points sit close to, but not exactly on, the fitted curve y = 9.98 × e^(0.2019x). The largest gap is at x = 3, where the actual value of 19.00 lands about 0.71 above the fitted 18.29. With R² = 0.9899 on the linearized data, roughly 99.0% of the variation in ln(y) is explained by the straight-line fit, so the curve still tracks the data closely even though no point lands on it exactly.

Definition

What Is Exponential Regression?

Exponential regression finds the values of a and b that make y = aebx the best-fit curve through a whole set of (x, y) data points, using least squares to minimize the total error.

Most everyday rate questions can be answered with two numbers and a bit of algebra: a starting value, an ending value, and the elapsed time in between. That works fine when both measurements are trustworthy. It breaks down the moment there are three, five, or twenty measurements, each with its own bit of noise, a slightly low reading here, a slightly high one there, and no obvious way to pick which two points to trust.

Exponential regression solves that by refusing to pick. It takes every point at once, transforms the problem into a straight line, and finds the single curve that keeps the total squared distance from every point as small as possible. No individual measurement is treated as more correct than any other; each just pulls the fitted curve slightly in its own direction.

This is the right tool whenever there are three or more (x, y) measurements believed to follow an exponential pattern and manually eyeballing a rate would mean guessing which points to trust. For the simpler case of exactly one starting value, one ending value, and a known elapsed time, the growth rate calculator solves directly for a single rate without needing the least-squares machinery at all.

Method

The Linearization Technique

Linearization replaces y = aebx with Y = ln(a) + bx by substituting Y = ln(y), turning a curve-fitting problem into an ordinary straight-line regression. Once every point is expressed as (x, Y) instead of (x, y), the standard least-squares slope and intercept formulas apply unchanged.

Step 1, the log transform
Y = ln(y)

Every y-value is replaced by its natural log. The exponential curve y = aebx becomes the line Y = ln(a) + bx in x and Y.

Step 2, ordinary least squares
b = [nΣ(xY) − ΣxΣY] / [nΣx² − (Σx)²]

The familiar linear-regression slope formula, applied to (x, Y) pairs instead of (x, y) pairs. ln(a) = (ΣY − bΣx) / n follows immediately, then a = eln(a).

Sums used in the least-squares formulas
SymbolNameWhat it represents
nPoint countHow many valid (y > 0) data points are being fitted.
ΣxSum of xEvery x-value added together.
ΣYSum of ln(y)Every log-transformed y-value added together.
Σ(xY)Sum of cross-productsEach x multiplied by its own Y, then summed.
Σx²Sum of squaresEach x squared, then summed.

What the table shows: only five running totals are needed to fit the entire curve. No matter whether there are 3 points or 10, the same five sums feed directly into the two formulas above, first for b and then for ln(a).

Procedure

How to Fit an Exponential Curve to Data

To fit an exponential curve, take the natural log of every y-value, run ordinary least-squares regression on the transformed (x, ln y) pairs, then convert the resulting slope and intercept back into b and a.

  1. List the (x, y) data points

    Confirm every y-value is strictly greater than zero. Points with y ≤ 0 have no logarithm and must be dropped.

  2. Transform each y into Y = ln(y)

    Replace every y-value with its natural log, keeping the x-values unchanged.

  3. Compute the five running sums

    Add up n, Σx, ΣY, Σ(xY), and Σx² across all the transformed points.

  4. Solve for the slope b

    b = [nΣ(xY) − ΣxΣY] / [nΣx² − (Σx)²].

  5. Solve for ln(a), then a

    ln(a) = (ΣY − bΣx) / n, then raise e to that power to recover a.

Worked example, daily app downloads

A new app is downloaded 20, 35, 55, and 90 times on its first four days. Fitting an exponential curve to those four points estimates the underlying daily growth rate.

Points
(1, 20), (2, 35), (3, 55), (4, 90)
Y = ln(y)
2.9957, 3.5553, 4.0073, 4.4998
n
4
Σx = 10, ΣY = 15.0582, Σ(xY) = 40.1277, Σx² = 30 b = [4 × 40.1277 − 10 × 15.0582] / [4 × 30 − 10²] b = [160.5107 − 150.5822] / 20 = 0.4964 ln(a) = (15.0582 − 0.4964 × 10) / 4 = 2.5235 a = e^2.5235 = 12.47, so y = 12.47 × e^(0.4964x)

At x = 4 the fitted curve predicts 90.85 downloads against an actual count of 90, within about 0.85 of the true value, and the fit's R² on the linearized data comes out to 0.9982.

Fit Quality

Interpreting R²

R² measures the share of the total variation in the data that the fitted curve accounts for, ranging from 0 (the curve explains nothing) to 1 (the curve passes through every point exactly). An R² of 0.95 means the model accounts for 95% of the spread in the data, leaving 5% as scatter the curve cannot explain.

This calculator computes R² on the linearized values, x against ln(y), rather than on the raw x-against-y relationship. That choice matters: it directly measures how straight the log-transformed relationship is, which is precisely the property that makes the untransformed data exponential in the first place. A high R² here means the points really do sit close to a straight line once logged, not merely that some curve could be forced through them.

A low R² is informative in its own right. It doesn't mean the math failed. The formulas will always return some a and b. It means the exponential shape is probably the wrong model for this particular data. The underlying relationship might be linear, quadratic, logarithmic, or simply too noisy to fit any smooth curve confidently. Seeing R² drop well below 0.9 is usually a better reason to reconsider the model than to distrust the arithmetic.

Anyone comfortable reading the curve this calculator draws has already seen the building block it's made from, the same rising exponential shape that the exponential growth calculator on the homepage plots from a single rate instead of a fitted one.

Questions

Frequently Asked Questions

What does exponential regression actually calculate?

Exponential regression calculates the values of a and b in y = aebx that make the curve pass as close as possible to every point in a data set, in the least-squares sense. Instead of guessing a growth rate from two points, it uses every point at once and finds the single curve with the smallest total squared error.

The output is a full equation, not just a rate, that can be used to predict y for any x, inside or slightly beyond the range of the original data.

Why does taking the log of y turn this into a straight-line problem?

Taking the natural log of both sides turns y = aebx into ln(y) = ln(a) + bx, which is the equation of a straight line in x and ln(y). The exponent b becomes an ordinary slope, ln(a) becomes an ordinary intercept, and the whole curve-fitting problem reduces to basic linear regression.

Why can’t a data point with y ≤ 0 be used?

A data point with y ≤ 0 can’t be used because the natural logarithm of zero or a negative number is undefined, and the entire method depends on computing ln(y) for every point. This calculator simply skips such rows and fits the curve to whatever points remain, with a note showing how many were left out.

What does R² tell you about the fit?

R² measures what fraction of the variation in the data is explained by the fitted curve, on a scale from 0 to 1, with 1 meaning a perfect fit. Because it’s computed here on the log-transformed values, R² specifically measures how straight the ln(y)-versus-x relationship is, which is exactly what makes the original y-versus-x relationship exponential.

How is this different from just picking two points and using the rate calculator?

Picking two points and solving for a rate uses only those two values and ignores everything else, so any noise or measurement error in those two points passes straight through into the answer. Exponential regression uses every point simultaneously, so a single noisy measurement can only pull the fitted curve slightly, not dictate it outright.

The growth rate calculator is the right tool when only a start value, an end value, and an elapsed time are known. Regression is the right tool once there are three or more measurements to work with.

How many data points are needed for a reliable fit?

Two points will always produce some curve, but a reliable exponential fit generally needs at least four or five points spread across a meaningful range of x, so that noise in any single measurement gets outvoted by the rest. Points clustered close together in x add little new information, even if there are many of them.

An R² close to 1 with only two or three widely-varying points is far less trustworthy than the same R² backed by six or more spread-out points.

Can exponential regression handle a decreasing (decaying) data set?

Yes, exponential regression handles decay automatically, because a negative fitted value of b simply describes a falling curve, y = aebx with b < 0, instead of a rising one. The y-values still have to be strictly positive for the log transform to work, even though the curve itself is heading toward zero.

What if the data isn’t actually exponential?

If the underlying data isn’t actually exponential, the fitted line in log-space will show a visible pattern of curvature in its residuals and R² will typically come out noticeably lower than 0.95 or so. The formulas will still return an a and a b. They don’t know or check whether an exponential model is appropriate.

A low R² is the signal to try a different model shape, such as linear, polynomial, or logarithmic regression, rather than to trust the exponential curve anyway.