Exponential Regression Calculator
Find the exponential growth or decay curve that fits a set of observed x and positive y values on the log scale. Compare the fitted curve and individual errors on both scales, and evaluate it at a chosen x. The worksheet handles unevenly spaced observations and shows whether a forecast is within the observed x range.
Exponential regression explorer
Fit observed pairs, inspect errors on both scales and evaluate the curve at a new x.
Observed pairs
Enter 3–200 pairs, one x and y per line. Use a comma or whitespace between values.
Log-linear fit
Log slope per x unit
0.416586362
Multiplier per x unit
1.51677499
Log-scale RMSE
0.0497457244
Log-scale R²
0.99292077
Original-scale RMSE
0.874631123
Original-scale R²
0.995170583
ŷ = 18.5639223 × exp(0.416586362 × (x − (2)))
The reference x is the sample mean. The fit minimizes squared errors in ln(y). RMSE values use their own scale.
Forecast at x 5
64.7788476
Extrapolation beyond the observed x range. Fitted ln(y) 4.17097912.
- Observed
- Fitted
- Forecast
Regression and residual ledger
Each residual is the observed response minus its fitted response on the scale shown.
| Row | Entered x | Entered y | Fitted y | Original residual | Log residual |
|---|---|---|---|---|---|
| 1 | 0 | 8 | 8.06914326 | -0.0691432647 | -0.00860577199 |
| 2 | 1 | 13 | 12.2390747 | 0.760925326 | 0.0603156817 |
| 3 | 2 | 17 | 18.5639223 | -1.56392234 | -0.0880066937 |
| 4 | 3 | 29 | 28.1572931 | 0.842706932 | 0.0294894302 |
| 5 | 4 | 43 | 42.7082778 | 0.291722159 | 0.00680735381 |
How to use this calculator
- Enter one x and positive y per line in Observed pairs. Use a comma or whitespace between the two values. Repeated x values are allowed when at least two predictors differ.
- Read Log-linear fit to see the centered equation and per-unit multiplier. Compare log-scale and original-scale diagnostics within their respective units.
- Switch between Original y and Log y to compare the fitted curve and observed-minus-fitted residuals. The log view shows y relative to the first observation's scale.
- Enable Show prediction at an x value and enter Forecast x. The forecast indicates whether it is within the observed range or an extrapolation.
- Review the Regression and residual ledger. Download the regression CSV or open its selectable copy for inputs, fitted values and diagnostics.
The Formula
The mathematical logic powering this calculation is:
For positive observed yᵢ, let zᵢ = ln(yᵢ) and let x̄ and z̄ be the sample means of x and z. The log slope b = Σ[(xᵢ − x̄)(zᵢ − z̄)]/Σ(xᵢ − x̄)². The fitted response is ŷ(x) = exp[z̄ + b(x − x̄)]. Its multiplier per one-unit increase in x is exp(b). The chart uses exact decimal predictor offsets before numerical fitting and displays log responses relative to the first y.
Log residual = ln(yᵢ) − ln(ŷᵢ). Original residual = yᵢ − ŷᵢ. On each scale, RMSE = √(Σ residual²/n) and R² = 1 − Σ residual²/Σ(actual − mean)². R² is undefined when actual values are constant on that scale. Original-scale R² can be negative because the optimum is computed on log y. The two RMSEs use different units.
The output is a back-transformed log fit. The equation minimizes squared log errors and gives a geometric-center prediction. Estimating the arithmetic conditional mean under a log-error model requires a separate retransformation approach. The forecast is a model evaluation at the entered x, with the observed minimum and maximum included in the within-range classification.
Enter 3 to 200 pairs with at least two distinct x values. Predictors accept signed plain decimals through ±1 trillion with up to six decimal places. Responses accept positive plain or scientific decimals from 1e−100 to 1e100, with up to 15 significant digits. Original-scale predictions are displayed from 1e−150 to 1e150. Beyond this display range the log value remains available and the original response is marked above or below range. If any training fit is outside the display range, the original-scale fit metrics are unavailable.Worked Example
If you input:
- Observed pairs: (0,8), (1,13), (2,17), (3,29), (4,43)
- Forecast x: 5
Result:
The log slope is approximately 0.41658636 and the fitted response at the mean x of 2 is approximately 18.56392. Log-scale R² is about 0.99292077 and log RMSE is about 0.04974572. Original-scale RMSE is about 0.87463112. At x = 5, the curve evaluates to about 64.77885, beyond the observed x range.
Frequently Asked Questions
How does exponential regression differ from an exponential growth projection?
Regression estimates the slope and scale from observations with different x values. A growth projection uses already specified parameters, or determines a curve through two exact anchors. This worksheet estimates a best fit for at least three observed pairs.
Why do the y values have to be positive?
This method fits a straight line to the natural logarithm of the response. The real natural logarithm requires a positive argument. Choose a model appropriate to your measurements if they include nonpositive responses.
Why can original-scale R² be negative?
On the original scale, the fitted curve can have a larger sum of squared errors than predicting the sample mean at every x. A negative original-scale R² indicates that comparison. The least-squares criterion here uses log responses.
What does the forecast represent?
It evaluates the fitted exponential curve at the requested x. Inside the observed range it is an interpolation and beyond that range it is an extrapolation. Its reliability depends on whether the same exponential pattern applies there.
Does the curve estimate the arithmetic mean of y?
The curve exponentiates the fitted log response and represents a geometric center. An arithmetic-mean prediction for a stochastic log-error model requires a retransformation method based on its error behavior.
What happens if y is constant or x values are repeated?
Constant positive y gives a flat model, zero residual error and undefined R². Repeated x values each contribute their own observation. At least two distinct x values are needed to estimate a slope.
Why is a response or multiplier marked outside display range?
Original response and multiplier values are displayed between 1e−150 and 1e150. The log-scale forecast remains available beyond those bounds. Original diagnostics require original-scale fits for every observation.
Similar Calculators
Linear Regression Calculator
Fit a least-squares line, inspect scatter and residual plots, and calculate Student-t confidence and prediction intervals. Paste paired data and export the full ledger.
Exponential Growth & Decay Calculator
Project exponential growth or decay from a rate or two observations. Find doubling time, half-life and when the curve reaches a target.
Pearson Correlation Coefficient Calculator
Calculate Pearson's r to measure the strength and direction of a linear relationship between two variables.
Standard Deviation Calculator
Calculate sample or population standard deviation, variance, mean and extrema from complete decimal data. Preserve small differences and identify invalid entries.
