Worked example
Example: Illustrative exponential growth, six points. The inputs, in the units selected above:
| Input | Value |
|---|---|
| Model | Exponential y = a·e^(bx) |
| Number of points used (2–8) | 6.0000 - |
| Point 1: x | 0 - |
| Point 1: y | 3.1000 - |
| Point 2: x | 1.0000 - |
| Point 2: y | 4.4000 - |
| Point 3: x | 2.0000 - |
| Point 3: y | 6.3000 - |
| Point 4: x | 3.0000 - |
| Point 4: y | 8.9000 - |
| Point 5: x | 4.0000 - |
| Point 5: y | 12.800 - |
| Point 6: x | 5.0000 - |
| Point 6: y | 18.100 - |
| Point 7: x | 0 - |
| Point 7: y | 0 - |
| Point 8: x | 0 - |
| Point 8: y | 0 - |
| x for prediction | 7.0000 - |
Applying the formula below gives:
| Result | Value |
|---|---|
| Coefficient a | 3.0971 |
| Exponent or rate b | 0.35347 |
| R² of the log-linear fit | 0.99997 |
| Predicted y at x₀ | 36.774 |
| Change in x (or factor in x) that doubles y | 1.9610 |
Open this example in the calculator and change any input.
Formula
\(\ln y = \ln a + bx \;\text{or}\; \ln y = \ln a + b\ln x, \quad b = \frac{n\sum uw - \sum u\sum w}{n\sum u^2 - (\sum u)^2}\)
Variables
| Symbol | Meaning | SI unit |
|---|---|---|
| \(\text{model}\) | Model | - |
| \(n\) | Number of points used (2–8) | - |
| \(x_1\) | Point 1: x | - |
| \(y_1\) | Point 1: y | - |
| \(x_2\) | Point 2: x | - |
| \(y_2\) | Point 2: y | - |
| \(x_3\) | Point 3: x | - |
| \(y_3\) | Point 3: y | - |
| \(x_4\) | Point 4: x | - |
| \(y_4\) | Point 4: y | - |
| \(x_5\) | Point 5: x | - |
| \(y_5\) | Point 5: y | - |
| \(x_6\) | Point 6: x | - |
| \(y_6\) | Point 6: y | - |
| \(x_7\) | Point 7: x | - |
| \(y_7\) | Point 7: y | - |
| \(x_8\) | Point 8: x | - |
| \(y_8\) | Point 8: y | - |
| \(x_0\) | x for prediction | - |
| \(a\) | Coefficient a | - |
| \(b\) | Exponent or rate b | - |
| \(R^2\) | R² of the log-linear fit | - |
| \(\hat y(x_0)\) | Predicted y at x₀ | - |
Method and standards
Log-linear fit.
Where it is used
- Growth, decay and scaling laws from test data.
- Fitting fatigue, creep or cost curves.
Common mistakes
- Including zero or negative y values.
- Reading R² of the log fit as the R² in y.
Assumptions and limits
- Errors multiplicative (constant relative scatter); up to eight points.
References
- Least squares on logarithms of the model
Questions and answers
Why is the fit done on logarithms?
It turns the model into a straight line, so ordinary least squares applies directly.
Is this the same as a nonlinear least-squares fit?
No. It weights relative errors equally; a nonlinear fit in y gives more weight to large values and slightly different coefficients.
What do the defaults represent?
Six illustrative points growing by about 40 % per unit x, fitted with the exponential model and predicted at x = 7.
Method and article reviewed by FireCAD engineering on 17 November 2026. Every result is checked against an independent calculation on each release: how we verify our calculators.
Sources
Montgomery and Runger, Applied Statistics and Probability for Engineers, 6th ed. (Wiley, 2014)