Exponential Regression Calculator
Growth that multiplies — bacteria, balances, epidemics, adoption curves — does not draw a line or a parabola; it draws the exponential, y = a·e^(bx), where each step multiplies the last by the same factor. This calculator fits that curve to your data by the classical route (take logarithms, fit the line they form), and returns the starting value a, the rate b, the percentage growth per unit, the doubling time, and predictions — the complete grammar of compounding, fitted to your numbers.
The Logarithm Trick, and Its Honest Price
The exponential is fitted by straightening it: taking natural logarithms converts y = a·e^(bx) into ln y = ln a + bx, a line in x whose slope is the rate b and whose intercept is ln a. Ordinary least squares on the transformed data — the same machinery as linear regression — then exponentiates back. The method is classical, transparent and fast, and it carries one declared bias worth understanding: fitting in log space minimises relative errors (a miss of 0.2 matters equally at y = 3 and y = 3,000) rather than absolute ones, so the fitted curve tracks the small values more faithfully than a direct nonlinear fit would. For genuinely multiplicative phenomena — where errors themselves scale with size, as growth data's usually do — that weighting is not a flaw but a match. The calculator reports R² on the original scale, computed against the back-transformed predictions, so the grade you read describes the curve you see, not its logarithmic shadow.
Worked Example: A Colony of Numbers
The defaults are six points of unremarkable-looking growth — 3.1, 4.4, 6.8, 9.9, 15.2, 22.1 at x = 0…5 — generated near y = 3e^(0.4x). The fit returns a = 3.042, b = 0.3976, within a whisker of the generating values, with R² = 0.9995 on the original scale. Translated into the dialect of growth: each unit of x multiplies y by e^0.3976 ≈ 1.488, i.e. +48.8% per step, and the doubling time is ln2 / 0.3976 ≈ 1.74 units — check it against the data: from 3.1, one doubling gives ≈ 6.2 near x = 1.7 (the data's 6.8 at x = 2 is close), two doublings ≈ 12.4 near x = 3.5, three ≈ 24.8 near x = 5.2. The prediction at x = 6 is 33.05. This constancy — equal ratios over equal steps — is the pattern recognition the whole exercise trains: a series whose successive ratios hover near a constant is exponential, whatever its absolute increments do, and increments are what the untrained eye reads.
Decay: The Same Curve, Running Downhill
Nothing in the mathematics prefers growth. With b negative, the identical formula describes radioactive decay, drug elimination, cooling, depreciation and discharge — and the calculator's note switches dialects automatically, reporting the half-life (ln2/|b|) where the growth case reported a doubling time. The symmetry is worth dwelling on because the two literatures disguise it: half-life problems and doubling problems are one problem, and a fitted b = −0.099 per day for a drug's plasma level is a half-life of 7.0 days by the same division a demographer's b = +0.011 per year is a 63-year doubling. Where the phenomenon is known to follow first-order kinetics (each molecule or dollar or degree behaves independently of the crowd), the exponential is not an approximation but the mechanism's own shape — the strongest warrant any regression curve can carry.
The Exponential's Limits, Stated on Its Own Page
Three warnings, in rising order of importance. Zeros and negatives are excluded — the logarithm's toll booth — so data that touch zero (counts with empty periods, balances that bottom out) need a shift, a different model, or a nonlinear fit; the calculator refuses rather than fudges. Saturation is real: every physical exponential meets its ceiling (nutrients, market size, carrying capacity), after which the honest model bends logistic; the exponential fitted to the early phase will over-predict with total confidence, and its R² within the fitted window will not warn you — the hub's ecology pages exist because nature files this objection at scale. Base confusion: the same growth can be written e^(bx), 2^(x/T) or 10^(cx) — the calculator's b is the natural-log rate; convert by the doubling time, which all bases share, rather than by comparing exponents across papers. Exponentials reward those who read them in ratios and punish, compounding, those who read them in differences.
The Two-Point Shortcut, and Why Regression Beats It
Faced with growth data, the folk method takes the first and last points and divides: the worked example's endpoints (3.1 at x = 0, 22.1 at x = 5) give a total ratio of 7.13 over five steps, a per-step ratio of 7.13^(1/5) ≈ 1.481, or +48.1% per step — close to the regression's +48.8%, and entirely hostage to those two points' noise. Had the last observation wobbled to 24 instead of 22.1, the shortcut's rate would jump to +50.6% while the regression, averaging six points' evidence, would move by a fraction of that. The endpoints are the two least representative points of any noisy series (each carries its full error unshared), and the logarithm-plus-line machinery exists precisely to distribute trust across all the data. Use the shortcut for a corridor estimate; use this calculator for a number you intend to defend.
The Rule of 70, Reconciled
The mental-arithmetic heirloom — doubling time ≈ 70 ÷ (percentage growth rate) — is this page's formula in a trench coat. For discrete growth at 5% per year the exact doubling is ln2/ln(1.05) ≈ 14.21 years; the rule's 70/5 = 14 is the same computation with ln2 ≈ 0.70 smuggled into the numerator and the rate read as a percentage. In the calculator's continuous dialect the rule is exact-looking for a reason: doubling = ln2/b, and with b expressed in percent (b = 5 meaning 0.05), 69.3/5 = 13.86 — the rule of 70 is the continuous formula rounded for pockets. Whichever dialect a source speaks, the doubling time is the invariant to compare; exponents are notation, doublings are facts.
Half-Lives Hiding in Plain Sight
The decay dialect's most familiar exhibit deserves its thirty seconds: carbon-14's half-life of about 5,730 years corresponds to b = −ln2/5730 ≈ −0.000121 per year — an exponential so patient that a sample's age is read from the fraction remaining by running this page's mathematics backwards, t = ln(N/N₀)/b. Radiocarbon dating is, in the strictest sense, an exponential regression with one data point and an unshakeable b. The same inversion prices drug dosing intervals, capacitor discharge and the cooling of coffee (Newton's law is this curve in a kitchen); the calculator's forward fit and the scientist's backward read are one equation, two professions.
Related Tools
More from the Statistics Calculators hub: the Cubic Regression Calculator and Quadratic Regression Calculator for polynomial shapes, the live Coefficient of Determination Calculator for grading any fit, and the Ecology hub's carrying-capacity tools for what happens when growth meets its ceiling.
Frequently Asked Questions
Why fit the logarithm instead of the curve directly?
Because the logarithm converts the problem into linear least squares — solvable exactly, in closed form, with no iteration or starting guesses — and because its error weighting (relative, not absolute) matches multiplicative data. Direct nonlinear least squares is the modern alternative and can differ slightly when errors are additive; for textbook and exploratory work the log-linear fit remains the standard, and this calculator declares its method so its numbers can be reproduced by hand.
What does b = 0.3976 mean in plain words?
Two equivalent readings: the instantaneous growth rate is about 39.8% per unit x (continuously compounded), and the realised step growth is e^b − 1 ≈ 48.8% per unit — the calculator prints the second, since it is the one bank statements and population tables mean. The doubling time, ln2/b ≈ 1.74 units, is the third reading and the most portable across contexts.
My data decay. Does the calculator still apply?
Yes — decay is the b < 0 case, and nothing else changes: the fit proceeds identically, the growth line reads negative, and the note reports a half-life instead of a doubling time. Radioactive samples, cooling bodies and depreciating assets all enter through the same form, provided every y is positive, as physical amounts in decay always are until they vanish into measurement noise.
Can I use this for compound interest?
You can, and it is instructive: balances at successive years fit a·e^(bx) with b = ln(1 + r), so the fitted b converts to the familiar annual rate by r = e^b − 1 — the growth percentage the calculator prints. Finance writes the same law as (1 + r)^t with discrete compounding; the exponential form is its continuous twin, and the two agree to within the compounding convention, a nuance the finance hub's own tools handle natively.
Why did the fit fail with an error about positive values?
Because some y in your list is zero or negative, and ln y does not exist there — a mathematical refusal, not a bug. Remedies depend on the cause: a constant offset in the measurement (subtract it), genuine zeros in count data (the exponential family is likely wrong; consider Poisson-style models), or a sign error in transcription (the commonest). The calculator names the offending condition rather than silently dropping points, because dropped points in regression are decisions and should be made by the analyst.
How far ahead can I predict?
The exponential's forecasts age faster than any other common model's, because errors compound at the same rate as the quantity itself: a b mis-estimated by 5% is a prediction off by half a doubling within fourteen doublings. Within or just past the data — the span where this page's examples live — the fit is serviceable; across regimes (saturation, intervention, depletion) it is a hypothesis about the world's constancy, and should be labelled as one.