SOLVETUTORMATH SOLVER

Instrument MI-07-070 · Statistics

Exponential Regression Calculator

Feed in x/y pairs that grow or shrink by a constant percentage each step, and this instrument fits the curve y = a·e^(b·x) through them — the standard technique for population growth, decay, and compounding-style data.

Instrument MI-07-070
Sheet 1 OF 1
Rev A
Verified
Type 07 — Regression & Correlation SER. 2026-07070

Coefficient a (y = a·e^(b·x))

2.000000

y = a·e^(b·x), fit via ln(y) = ln(a) + b·x (linear regression on x vs ln y)

0.500000 Coefficient b (growth/decay rate)
1.000000 R-squared (of the linearized fit)
The working Every figure verified twice
  1. a=2.000000, b=0.500000, r^2 (log-space)=1.000000
Worksheet log
  1. No entries yet — change an input to log a scenario.

How this instrument works

Exponential regression fits a curve, not a straight line, through data that grows or shrinks by a roughly constant percentage at every step — bacteria doubling on a schedule, a radioactive sample decaying, a viral post's shares climbing night after night. A straight-line fit forces that kind of data into a shape it doesn't have; the curve y = a·e^(b·x) matches it directly, with a as the starting value at x = 0 and b as the continuous growth rate (positive b) or decay rate (negative b).

The fitting method is a clever shortcut rather than a brand-new algorithm: take the natural log of every y value, which turns the curve ln(y) = ln(a) + b·x into an ordinary straight line, then run the same least-squares linear regression this site's linear-regression instrument already performs on the transformed pairs (x, ln y). The slope of that line is b directly; exponentiating the intercept recovers a. This is the standard, textbook approach to exponential curve fitting (see the MathWorld reference below) and is why every y value must be strictly positive — the natural log of zero or a negative number is undefined.

R-squared here describes how well the straight line fits the log-transformed points, not directly how well the curve fits your original data — for data that is genuinely exponential (or close to it) the two are nearly the same, and a perfect exponential relationship gives R-squared exactly 1.0. For noisy real-world data, log-transforming compresses large y values and stretches small ones, so this linearized fit weights points slightly differently than a true nonlinear least-squares fit would; the difference is usually small in practice but worth knowing before treating R-squared as the final word on fit quality.

y=aebxy = a e^{bx}ln(y)=ln(a)+bx\ln(y) = \ln(a) + bx
y — the modeled output · x — the input variable · a — the fitted value of y at x = 0 · b — the continuous growth rate (b > 0) or decay rate (b < 0) · the fit is found by taking the natural log of every y value and running ordinary least-squares linear regression on the transformed pairs (x, ln y).
  • Enter your input values into x values — these can be time steps, distances, or any ordered numeric input.
  • Enter the matching outputs into y values (must be positive) — every value must be strictly greater than zero.
  • Read Coefficient a (the fitted value at x = 0) and Coefficient b (the growth or decay rate) beneath the inputs.
  • A positive b means growth (the curve rises); a negative b means decay (the curve falls toward zero).
  • Check R-squared — closer to 1.0 means the exponential curve tracks your data closely on the log scale.

Worked example — an hourly bacteria count

A lab samples a bacteria culture every hour and records its population in thousands: 2.0 at hour 0, 3.297442541400256 at hour 1, 5.43656365691809 at hour 2, and 8.963378140800574 at hour 3. Enter 0, 1, 2, 3 into x values and those four counts into y values. Taking the natural log of each count gives a set of points that fall on a perfectly straight line, because this data was generated from y = 2·e^(0.5x) exactly.

The fit recovers Coefficient a = 2 (the population at hour 0, in thousands) and Coefficient b = 0.5 (a continuous growth rate of 50% per hour), with R-squared = 1.0 — every hourly count sits exactly on the fitted curve. At hour 4 the model predicts 2·e^(0.5×4) = 2·e² ≈ 14.78 thousand cells, extending the same doubling-and-then-some pattern the four observed hours already show.

Questions

How is this different from this site's linear-regression calculator?

Linear regression fits a straight line, y = intercept + slope·x, directly to your data. Exponential regression fits a curve, y = a·e^(b·x), by first taking the natural log of y and then running that same straight-line fit on the transformed pairs (x, ln y) — a distinct model shape for a distinct kind of data (constant-percentage growth or decay) rather than constant-amount change. Use linear regression when equal steps in x produce roughly equal changes in y; use exponential regression when equal steps in x produce roughly equal percentage changes in y.

Why does every y value have to be positive?

The fitting method works by taking the natural logarithm of each y value before running the linear regression, and the natural log of zero or a negative number is mathematically undefined. If your data includes a zero or negative reading — a population that hit zero, a signal that went negative — exponential regression cannot be fit to it as given; you'd need to shift or filter the data first.

Does R-squared = 1.0 mean the exponential model is perfect?

It means every point falls exactly on the fitted curve after the log transformation, which is the strongest possible result for this kind of fit. For real, noisy data, R-squared close to but below 1.0 is far more typical, and because the fit is computed on log-transformed values rather than the raw y values, it describes fit quality on that transformed scale — a very good log-scale fit is still an excellent sign for the original curve, just not a mathematically identical statement.

What do coefficients a and b actually represent?

a is the model's predicted value of y at x = 0 — the starting amount before any growth or decay has occurred. b is the continuous rate of change: a positive b means y grows (and a larger b means faster growth), while a negative b means y shrinks toward zero. Both come directly off the slope and intercept of the log-linearized straight-line fit.

What if my data doesn't actually follow an exponential pattern?

The calculator will still return a best-fit a, b, and R-squared for whatever x/y pairs you enter — it doesn't check whether an exponential shape is appropriate. A low R-squared is the signal to look elsewhere: data that changes by a roughly constant amount (not percentage) per step usually fits a straight line far better, in which case this site's linear-regression instrument is the right tool.

References