Statistics & data
Graph Linearization & Logarithmic Regression Calculator
Choose transformed axes to test a physical model, then examine the fit and residuals. Logarithms use dimensionless ratios to a reference quantity.
Your measurements
Start with the example, or enter your own values. Use a dot for decimals and e for scientific notation.
Calculated locally. No account or uploads.
Result & working
ExampleThe calculator is loading. You can read the worked example below.
Step-by-step working
The formula
Δf ≈ |df/dx| Δx
Δ(x²) ≈ 2|x|Δx; Δ(1/x) ≈ Δx/x²
Δln(x/x_ref) ≈ Δx/|x|; Δlog₁₀(x/x_ref) ≈ Δx/(|x| ln 10)
y = A xⁿ ⇒ ln y = n ln x + constant
y = A exp(kx) ⇒ ln(y/y_ref) = kx + ln(A/y_ref)
| Symbol | Meaning |
|---|---|
| X, Y | Transformed coordinates; regression is Y = mX + c. |
| Reference | A positive reference quantity in the same unit as its input. It has no uncertainty in this model. |
| Residual | Observed transformed Y minus fitted Y. |
When to use this calculator
Linearize the proposed equation before selecting axes. For T² = (4π²/g)L, plot T² vertically against L horizontally. For an inverse law, plotting y against 1/x can reveal a line. A log–log plot can estimate a power; a log–linear plot can estimate an exponential rate.
Logarithmic coordinates are drawn on equally spaced log-value axes, which corresponds to a logarithmic scale in the original quantity. Read labels as transformed values. Changing units or reference quantities changes a log intercept.
Uncertainties use local first-order derivatives. Large relative uncertainties give asymmetric transformed intervals and require more care. OLS here is unweighted and does not fit x errors; bars are displayed for inspection, not used as statistical weights.
Worked example
The calculator opens with these example values. All steps below are available even with JavaScript disabled.
- Transform x using square; transform y using raw. Log references: x_ref = 1, y_ref = 1 in the corresponding input units.
- First row: (1, 3) → (1, 3). First-order uncertainties: ΔX = 0.02, ΔY = 0.1.
- Sxx = 129, Sxy = 387; m = Sxy/Sxx = 3.
- c = Ȳ − mX̄ = 22.5 − (3) × 7.5 = 0.
- Residuals are Y − (mX+c); SSE = 0. Y = 3 X + 0.
Y = 3 X + 0
Common mistakes
- Do not take a logarithm of a non-positive value or a dimensioned quantity without a reference.
- Do not compare R² from different transformations as if they used the same residual scale.
- A high R² alone does not establish the physical model. Inspect residuals and uncertainty bars.