Exponential models describe quantities that change by a constant percentage rather than a constant amount: money growing with compound interest, bacteria doubling every hour, a cup of coffee cooling towards room temperature, the activity of a radioactive sample, the spread of an early-stage epidemic. In the model y = a·bˣ, a is the value at x = 0 and b is the factor by which y is multiplied for each one-unit step in x. If b is above 1 the quantity grows; if it lies between 0 and 1 it decays.
The classic way to fit the model is to take the natural logarithm of y. Because ln y = ln a + x·ln b is a straight line in x, ordinary linear regression on (x, ln y) gives ln a and ln b, which are then exponentiated. This is what spreadsheets and most calculators do. Its side effect is that it minimises errors in ln y, so it gives relatively more weight to small y values.
If you want the curve that minimises squared errors in y itself, choose the non-linear least-squares option: the calculator starts from the log-linear fit and refines it with the Gauss–Newton method. Both versions report R² on the original scale so you can compare them.
How to use the Exponential Regression Calculator
- x values
- y values (all positive): Same number of values as x
- Fitting method
- Predict y at x =: Optional, leave empty to skip the prediction
- Precision (significant figures)
Everything is calculated in your browser, so results appear instantly and nothing you type is sent to a server.
How it works
For the log-linear method the tool regresses ln y on x and sets a = e^(intercept), k = slope and b = eᵏ. For non-linear least squares it then minimises Σ(y − a·eᵏˣ)² with Gauss–Newton steps and step halving. The growth rate per unit of x is (b − 1) × 100%, the doubling time ln 2 ÷ k (or half-life ln 2 ÷ |k| for decay).
Worked example
A bacterial culture (thousand cells) is counted hourly: 3, 4.4, 6.9, 10.1, 15.5, 22.6 at x = 0…5 h. Regressing ln y on x gives slope k = 0.4073 and intercept 1.0956, so a = e^1.0956 = 2.991 and b = e^0.4073 = 1.503: y = 2.991 × 1.503ˣ. The culture grows about 50.3% per hour and doubles every ln 2 ÷ 0.4073 ≈ 1.70 h. R² on the original scale is 0.99929. At x = 6 h the model predicts about 34.4 thousand cells. The non-linear least-squares option gives the very similar y = 3.059 × 1.493ˣ.
Log-linear or non-linear?
- Log-linear: the standard textbook and spreadsheet method; best when the scatter is proportional to y (constant percentage error).
- Non-linear least squares: best when the scatter has the same size at all levels of y (constant absolute error).
- If the two fits differ a lot, look at the residuals, because the model itself may not suit the data.
Formula
y = a·bˣ = a·eᵏˣ, k = ln b · ln y = ln a + k·x (log-linear fit) · growth rate = (b − 1) × 100% · doubling time = ln 2 ÷ k
Worked example
Inputs: x values: 0, 1, 2, 3, 4, 5; y values (all positive): 3, 4.4, 6.9, 10.1, 15.5, 22.6; Fitting method: Log-linear (regress ln y on x – as in Excel); Predict y at x =: 6; Precision (significant figures): 4.
Results: Regression equation (y = a·bˣ) = y = 2.991 × 1.503ˣ; Same model as y = a·eᵏˣ = y = 2.991 × e^(0.4073x); Initial value a (y at x = 0) = 2.990978; Growth factor b (per unit of x) = 1.502751; Continuous rate k = ln b = 0.407297; Growth (+) or decay (−) per unit of x = 50.2751 %.
Key terms
- Growth factor (b)
- The multiplier applied to y for each unit increase in x.
- Continuous rate (k)
- ln b; the instantaneous relative rate of change.
- Doubling time
- Time for an increasing quantity to double, ln 2 ÷ k.
- Half-life
- Time for a decaying quantity to halve, ln 2 ÷ |k|.
Frequently asked questions
How do you calculate exponential regression?
Take ln of every y, fit a straight line ln y = c + kx by least squares, then a = eᶜ and b = eᵏ. The calculator shows the result in both forms.
Why must all y values be positive?
The model a·bˣ is always positive for a > 0, and the logarithm of zero or a negative number does not exist.
What is the difference between y = a·bˣ and y = a·eᵏˣ?
None. They are the same curve with b = eᵏ. k is the continuous growth rate, b the growth factor per step.
How do I get the growth rate in percent?
(b − 1) × 100%. b = 1.503 means about 50.3% growth per unit of x.
How is the doubling time found?
ln 2 ÷ k. With k = 0.4073 per hour the doubling time is 0.693 ÷ 0.4073 ≈ 1.70 hours.
Why does my result differ slightly from another tool?
Some tools minimise errors in ln y (log-linear), others in y (non-linear). Switch the fitting method to compare.
When is exponential regression the wrong model?
When growth slows towards a ceiling (use a logistic model) or the change per step is constant (use linear regression).