Skip to content

Exponential Regression Calculator

Fit y = a·exp(bx) to positive paired data by least squares on ln(y), then compare the observed points with the fitted curve.

Paired data

Processed in your browser.

2–200 values. Separate with spaces, commas, or semicolons; use a dot for decimals.

Every Y value must be greater than zero because the calculation uses ln(y).

Result

Enter paired X and positive Y values, then calculate.

How to use the exponential regression calculator

  1. Enter X values in the first field and their matching positive Y values in the second. Position matters: the first X belongs to the first Y, the second X to the second Y, and so on. Keep units consistent and omit headings or unit symbols.
  2. Separate values with spaces, commas, or semicolons. Use a period as the decimal point even if the result language normally uses decimal commas. Scientific notation such as 2e-3 is accepted.
  3. Select Calculate. The equation appears first, followed by a, b, the number of pairs, and the sum of squared residuals in log space. Compare the observed dots with the fitted curve rather than reading a coefficient alone.
  4. Copy results copies the displayed numerical summary as text. Editing either list immediately removes the confirmed result and disables Copy. Clear empties both fields, errors, result, and chart; no data is uploaded or saved.

Formula and interpretation

The model is y = a·exp(bx), with a greater than zero. Taking natural logarithms gives ln(y) = ln(a) + bx. The calculator performs ordinary least squares on the pairs (x, ln(y)). The fitted straight-line intercept is ln(a), so exponentiating it gives a; the straight-line slope is b.

The objective shown as log-space SSE is Σ[ln(yᵢ) − ln(ŷᵢ)]². A smaller value means the fitted curve is closer in logarithmic terms for this same dataset. It is not the sum of squared differences yᵢ − ŷᵢ on the original scale, so it must not be compared as though this page had run original-scale nonlinear least squares.

At x = 0, the model value is a. A positive b describes exponential growth, a negative b describes exponential decay, and b = 0 gives a constant curve. The coefficients retain full browser precision internally; rounding is applied only for display and copying. The chart uses the same unrounded fit.

Worked examples

Exact doubling

For X = 0, 1, 2 and Y = 1, 2, 4, ln(Y) is 0, ln(2), 2ln(2). The fitted result is a = 1 and b = ln(2) ≈ 0.69314718, so y = exp(0.69314718x). The curve passes through all three points and the log-space SSE is 0 apart from floating-point display noise.

Constant response

For X = −2, 0, 5 and Y = 3, 3, 3, every ln(Y) is ln(3). The slope is b = 0 and a = 3, producing the horizontal curve y = 3. Reordering these pairs does not change the coefficients.

Uses, limits, and error handling

This fit is useful for exploring multiplicative growth or decay when a log-linear model is appropriate, such as a quantity changing by a roughly constant factor per unit of X. It is a descriptive calculator, not evidence that an exponential mechanism caused the data. It does not provide p-values, confidence intervals, automatic forecasts, or statistical decisions.

At least two pairs are required, the list lengths must match, every value must be finite, every Y must be positive, and X must contain at least two distinct stored values. Inputs are limited to 200 pairs and magnitudes up to 1e100, with nonzero magnitudes no smaller than 1e-100. If very large offsets make distinct X values indistinguishable in browser arithmetic, recenter X—for example, subtract a common year—or choose more suitable units.

Finite inputs can still create an unrepresentable a, b, fitted point, or chart coordinate. In that case the calculator reports a numerical-range error instead of displaying Infinity, zero caused by underflow, or a misleading curve. Copy is plain text only and the chart is an on-screen explanation; there is no file upload, image export, account, database, API, or saved history.

Frequently asked questions

Why must Y be positive?

The natural logarithm is defined here only for positive real Y. Zero and negative Y cannot be used in this log-linear fit.

Is this the same as nonlinear least squares?

No. This calculator minimizes squared residuals after transforming Y with the natural logarithm. Direct nonlinear least squares on the original Y values uses a different objective and can return different coefficients.

What does b mean?

For a one-unit increase in X, the fitted value is multiplied by exp(b). Positive b means growth, negative b means decay, and zero means no fitted change.

Why can changing units change a?

The value a is the fitted Y at x = 0. Shifting the X origin therefore changes a while describing the same curve in the new coordinates; b also changes if the size of one X unit changes.

Does the input order matter?

No, provided each X stays paired with its correct Y. Reordering complete pairs leaves the least-squares result unchanged.

How should I use the copied result?

Paste the equation and coefficients into notes or a report, and state that the fit minimizes log-space SSE. Keep the original data and units with it; the copied summary is not a confidence statement or forecast.