Statistics & data

Linearization & log plots

Transform data to test a linear model.

Your measurements

Number formats & units

Use decimal dots in datasets. Single values also accept decimal commas and scientific notation such as 1.2e-3 or 1.2 × 10⁻³.

Graph Linearization & Logarithmic Regression Calculator inputs

Calculated locally. No account or uploads.

Result & working

Example

The calculator is loading. You can read the worked example below.

Copy & export

Formula & example

The relationship

Δf≈∣dfdx∣Δx\Delta f\approx\left|\frac{df}{dx}\right|\Delta x
Δ(x2)≈2∣x∣Δx\Delta(x^2)\approx2|x|\Delta xΔ ⁣(1x)≈Δxx2\Delta\!\left(\frac1x\right)\approx\frac{\Delta x}{x^2}
Δln⁡ ⁣(xxref)≈Δx∣x∣\Delta\ln\!\left(\frac{x}{x_{\mathrm{ref}}}\right)\approx\frac{\Delta x}{|x|}Δlog⁡10 ⁣(xxref)≈Δx∣x∣ln⁡10\Delta\log_{10}\!\left(\frac{x}{x_{\mathrm{ref}}}\right)\approx\frac{\Delta x}{|x|\ln10}
y=Axn  ⟹  ln⁡y=nln⁡x+constanty=Ax^n\implies\ln y=n\ln x+\text{constant}
y=Aexp⁡(kx)  ⟹  ln⁡ ⁣(yyref)=kx+ln⁡ ⁣(Ayref)y=A\exp(kx)\implies\ln\!\left(\frac{y}{y_{\mathrm{ref}}}\right)=kx+\ln\!\left(\frac{A}{y_{\mathrm{ref}}}\right)
What the variables mean
SymbolMeaning
X,  YX,\;YTransformed coordinates; regression is Y = mX + c.
ReferenceA positive reference quantity in the same unit as its input. It has no uncertainty in this model.
ResidualObserved transformed Y minus fitted Y.

Worked example

Data: x y, optionally followed by Δx Δy
1 3 0.01 0.1 2 12 0.01 0.2 3 27 0.01 0.3 4 48 0.01 0.4
Transform x
Square
Transform y
Unchanged
X-axis label / unit
x / s
Y-axis label / unit
y / m

Y = 3 X + 0

Follow the example steps
  1. Transform x using square; transform y using raw. Log references: x_ref = 1, y_ref = 1 in the corresponding input units.
  2. First row: (1, 3) → (1, 3). First-order uncertainties: ΔX = 0.02, ΔY = 0.1.
  3. Sxx = 129, Sxy = 387; m = Sxy/Sxx = 3.
  4. c = Ȳ − mX̄ = 22.5 − (3) × 7.5 = 0.
  5. Residuals are Y − (mX+c); SSE = 0. Y = 3 X + 0.

Common mistakes

Logarithms need a positive, dimensionless ratio.

Incorrect approach

ln(−2)

Correct approach

ln(2/1) ≈ 0.6931

More checks before you submit
  • 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.
Method notes

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.