Calibration curve calculator
A linear calibration from your standards — slope and intercept with their standard errors, the residual plot that shows what r² hides, and an unknown's concentration read back off the line.
The formula
m = Σ(xᵢ − x̄)(yᵢ − ȳ) / Σ(xᵢ − x̄)² b = ȳ − m x̄ S(y/x) = √( Σ(yᵢ − ŷᵢ)² / (n − 2) ) x̂ = (y − b) / m
- m
- slope of the calibration line
- b
- y-intercept, pinned to zero for a forced fit
- S(y/x)
- residual standard deviation — the scatter of the standards about the line
- x̂
- concentration read back from an unknown's response
- r²
- fraction of the variation the line explains — not a test of linearity
Worked example
Five standards and one unknown
Five standards at 2.00, 5.00, 10.00, 20.00 and 50.00 µg/mL give peak-area ratios of 0.1140, 0.2695, 0.5301, 1.0462 and 2.6105. The least-squares line through them has a slope of 0.05201 ± 5.163e-5 and an intercept of 0.009124 ± 0.001271, with S(y/x) = 0.002010 and r² = 0.999997. Every figure is shown to four significant figures except r², which is fixed at six — at four, a good calibration reads 1.000 and the pitfall below becomes unarguable.
An unknown reading 0.4521 therefore sits at (0.4521 − 0.009124) / 0.05201 = 8.517 µg/mL. Note that this is inside the calibrated range — between the 5.00 and 10.00 µg/mL standards — which is the only place the line is evidence of anything.
Common pitfalls
r² is not a test of linearity
Take the same five concentrations with responses 0.1133, 0.2710, 0.5370, 1.0810 and 2.8090. The fit returns r² = 0.999721 — a figure most analysts would accept without hesitation. But the residuals run positive, positive, negative, negative, positive: a U-shape, meaning the response is curved and the straight line under-reads through the middle of the range. r² is a measure of how much variation the line explains, and over a wide concentration range even a curved response explains almost all of it. Read the residual plot.
The residual plot is the diagnostic
Scatter with no pattern means the linear model fits. A curve means the response is not linear. A fan opening to the right means the variance grows with concentration, which is the situation weighted regression exists for and this calculator does not do. The pattern is what matters, not the size of any single residual.
Forcing through the origin is a claim about the method
A blank that genuinely gives zero response justifies it. An intercept you dislike does not. Forcing the line through zero when the method has a real intercept biases every back-calculated result, worst at the bottom of the range where it matters most, and it will still produce a respectable r². Two of the reported statistics also change definition when it is on: the residual standard deviation divides by n − 1 rather than n − 2, because only one parameter was fitted, and r² is computed against the uncorrected total sum of squares, which is the convention for a no-intercept model.
A calibration is only evidence over its own range
Reading an unknown below the lowest standard or above the highest is extrapolation, whatever the arithmetic returns. The line was never tested there. If unknowns keep landing outside the range, the range is wrong.
The standard errors describe the line, not the unknown
Slope ± its standard error says how well the slope is determined by these standards. It is not the uncertainty on a back-calculated concentration, which is larger and depends on where in the range the unknown falls. This calculator reports the point estimate; treat it as the centre of an interval it does not yet draw.
Decimal commas and thousands separators
Values in the concentration and response columns are separated by commas, newlines, tabs and spaces, so a decimal comma cannot also be a decimal point: typing “0,5301” into the responses column reads as two values, not one. Use a dot. Numbers grouped like “1,234,567” — the way a spreadsheet formats a peak area — are rejected outright and listed as unread rather than guessed at.
Turn this into a validation study
The validation suite runs the same statistics, guided section by section, and ends in an auditor-ready PDF report. Sign in free and start one in minutes.