The exponential regression calculator above fits the model y = abx to paired data and returns the coefficients, the growth rate per unit, the doubling time, a prediction and the R-squared. It does the fit twice: once the standard way, by taking logarithms of y and running an ordinary straight-line regression, and once by minimising the squared error on the untransformed curve directly. Both sets of coefficients are on the page at the same time, because they are not the same answer and the difference is not a rounding artefact.
Arb Digital publishes it this way because almost every exponential regression tool, spreadsheet function and graphing calculator uses the log-transform method without saying so, and the choice has consequences the user never sees. Taking a logarithm changes which errors count as large. A fit that minimises squared error in log space is minimising relative error on the original scale, which weights small y values as heavily as large ones. A direct fit minimises absolute error, which is dominated by the large values. Neither is universally right, but they answer different questions and you should know which one produced your coefficients.
What This Exponential Regression Calculator Does
It takes a list of x,y pairs and estimates a and b in y = abx, which is the same model as y = aekx with k = ln(b). The tool reports the base b, the equivalent continuous rate k, the percentage growth per unit of x, and the doubling time ln(2)/k where growth is positive. R-squared is always computed on the original y scale for both fits, so the two numbers are directly comparable.
This is a different model from the one our linear regression calculator fits, which is a straight line and cannot bend. It is also different from our polynomial regression calculator, which bends but does so through powers of x rather than a constant multiplicative growth. The exponential model is the right choice when each step in x multiplies y by a fixed factor — compounding, unchecked population growth, decay, or anything with a constant percentage change per period.
How to Use It
- Paste your pairs. One per line, x first, then y, separated by a comma, a space or a tab.
- Check that every y is positive. The log transform is undefined at zero and below, so those rows are skipped and the count of skipped rows is reported.
- Read the equation and R-squared. The headline shows whichever method you select; the table shows both fits against every observation.
- Compare the two fits. If the coefficients agree to three figures, the choice does not matter for your data. If they do not, read the section below before quoting either.
- Predict cautiously. Exponential extrapolation compounds, so a small coefficient error becomes a large prediction error very quickly.
The Two Fits and How They Are Calculated
The log-linear method uses the identity ln(y) = ln(a) + x·ln(b). That is a straight line in x with intercept ln(a) and slope ln(b), so ordinary least squares applies directly. Exponentiating the intercept and the slope recovers a and b. It is fast, it has a closed-form solution, and it is what a spreadsheet's exponential trendline does.
The direct method minimises Σ(yi − abxi)2 on the untransformed data. Once b is fixed, a enters linearly and can be solved exactly as Σ(yibxi)/Σ(b2xi), so the calculator searches over k = ln(b) on a grid and then refines the best region, solving a exactly at each step. This is the nonlinear least squares approach described in the NIST/SEMATECH e-Handbook's section on nonlinear least squares regression, which notes that such models require an iterative procedure rather than a closed form.
R-squared is reported as 1 − SSE/SST with both sums computed on the original y values, for both fits. This matters: the R-squared a spreadsheet prints next to an exponential trendline is usually the R-squared of the straight line in log space, which is a different and generally higher-looking number. Comparing a log-space R-squared against an original-scale one is not a fair comparison, so this page does not offer you the chance to make it.
Why the Log Transform Changes the Answer
Least squares treats every residual as equally important. After a log transform, "equally important" refers to residuals in log units, and a fixed distance in log units is a fixed ratio on the original scale. A point that should be 10 and is measured as 12 has a log residual of ln(1.2) = 0.182. A point that should be 1,000 and is measured as 1,200 has exactly the same log residual, despite being wrong by 200 rather than 2.
On the untransformed scale those two errors are not remotely equivalent, and a direct least squares fit will chase the large one and ignore the small one. The log fit does the opposite: it spreads its attention evenly across the whole range, which is why it is often the better choice when your measurement error really is proportional — percentage-accurate instruments, counts across several orders of magnitude, or anything where you would naturally describe the error as "about five percent".
The default data on this page shows the effect. The first observation sits well above the trend at the low end of the range, where y is small. The log fit, treating that as a large relative error, pulls its intercept up and its base down to accommodate it. The direct fit, seeing a small absolute error, largely ignores it and tracks the big values instead. The two equations differ visibly, and the table underneath the result shows exactly where each one is paying its attention.
Choosing Between the Two Methods
Use the log-linear fit when your errors are multiplicative — roughly constant as a percentage of y. This is the common case in biology, epidemiology, finance and any measurement where instrument accuracy is quoted as a percentage. It is also the right choice when the data spans several orders of magnitude, because otherwise the largest few points determine everything.
Use the direct fit when your errors are additive — roughly constant in absolute size regardless of y. This happens with instruments that have a fixed noise floor, with rounded or truncated readings, and with counts subject to a fixed measurement offset. It is also the fit to use if the number you care about is a prediction at the top of the range, since that is where it concentrates its accuracy.
If you have no idea which describes your data, plot the residuals. Residuals that fan out as y grows indicate multiplicative error and point to the log fit. Residuals of roughly constant size across the range point to the direct fit. That plot takes a minute and settles the question far better than a default does.
What R-Squared Does and Does Not Tell You Here
A high R-squared on an exponential fit is much less impressive than it looks. When y spans two orders of magnitude, the total sum of squares is enormous, so almost any curve that goes up steeply captures most of it. R-squared values above 0.98 are routine for exponential fits to data that is visibly not exponential, which makes the statistic close to useless as a shape check.
The useful diagnostic is the residual pattern, which the table below the result makes visible. Residuals that are systematically positive at both ends and negative in the middle mean the true curve bends more sharply than an exponential; the reverse pattern means it bends less. Either way the model is wrong in a way R-squared will not report. Our R-squared calculator explains the statistic in more depth, and our correlation coefficient calculator covers the closely related question of linear association, which after a log transform is what an exponential fit is really measuring.
A Worked Example You Can Check Yourself
The default data runs from x = 0 to x = 5 with y values of 120, 140, 230, 330, 510 and 750. Take natural logs of y and you get roughly 4.787, 4.942, 5.438, 5.799, 6.234 and 6.620. The mean of those logs is 5.637 and the mean x is 2.5, and the least squares slope comes out at 0.3829. The intercept is therefore 5.637 − 0.3829 × 2.5 = 4.680, so b = e0.3829 = 1.4666 and a = e4.680 = 107.7. The equation is y = 107.7 × 1.4666x, which is growth of about 46.7 percent per unit of x and a doubling time of ln(2)/0.3829 = 1.81 units.
The direct fit lands on y = 102.6 × 1.4889x — a lower a and a higher b — because it is unwilling to spend accuracy at the low end to fit the point at x = 0 and would rather track the values at x = 4 and x = 5. At x = 5 the log fit predicts 730.8 against an observed 750, while the direct fit predicts 750.6. Switch the headline selector between the two and watch the prediction at x = 6 move. That gap is not error in the tool; it is the honest range of answers this data supports, and it is exactly the information a single-number calculator hides. Penn State's STAT 501 Regression Methods course notes cover log transformation as a modelling decision with consequences, rather than as a mechanical preprocessing step.
For the arithmetic behind the transform itself, our logarithm calculator handles the conversions between bases, and our exponential growth calculator projects forward from a rate you already know rather than estimating one from data.
Arb Digital's analysts state which error a model minimises before they quote its prediction, and check the residuals before they quote its R-squared.
Browse All Free Tools Talk To Our TeamCommon Mistakes to Avoid
- Quoting a log-space R-squared as if it described the original data — the two are computed on different scales and the log-space version usually looks better.
- Including zero or negative y values — the logarithm is undefined there, and dropping those rows silently changes the fit without any warning in most software.
- Extrapolating far beyond the data — a one percent error in b becomes a compounding error in the prediction, and nothing in the real world grows exponentially forever.
- Assuming exponential because the curve goes up — power laws, logistic curves and quadratics all rise steeply too, and only the log-scale plot distinguishes them.
- Reporting coefficients without the method — a and b depend on which error was minimised, so the method is part of the result.
Related Free Tools From Arb Digital
Fit a straight line instead with the linear regression calculator, bend the curve through powers of x with the polynomial regression calculator, interpret the fit statistic with the R-squared calculator, measure linear association with the correlation coefficient calculator, convert between bases with the logarithm calculator, or project forward from a known rate with the exponential growth calculator. The free online tools hub lists every statistics tool we publish.
Frequently Asked Questions
It is the process of fitting a curve of the form y equals a times b to the power x through paired data, so that each unit increase in x multiplies y by a constant factor b. It suits data with a constant percentage change per period.
Because fitting a straight line to log-transformed y minimises relative error, while fitting the exponential curve directly minimises absolute error. They are different objectives and they produce different coefficients whenever the residuals are not proportional to y.
Report the one whose error assumption matches your data, and say which you used. Multiplicative or percentage-based measurement error points to the log-linear fit; a fixed absolute noise level points to the direct fit.
Not with the log transform, which is undefined at zero and below. Those rows are excluded here and the count is reported, because dropping data silently is the more dangerous behaviour.
Subtract one and express the result as a percentage. A base of 1.47 is 47 percent growth per unit of x, and the equivalent continuous rate is the natural logarithm of b.
No. When y spans a wide range the total variation is large, so almost any rising curve captures most of it. The residual pattern is a far better check than the summary statistic.
They are the same model written two ways, with k equal to the natural logarithm of b. The first is convenient when you think in growth factors per period, the second when you think in continuous rates.
This page explains a statistical calculation for educational purposes only. It is not financial, medical or business advice, and an exponential trend fitted to past observations is not a forecast of what will happen next.