Calibration curve calculator
y = b · x + a
Enter your standards, choose the weighting and add the measured signal of an unknown sample. The line, the back-calculated standards, the unknown with its 95 % confidence interval and, if you switch it on, the LOD and LOQ update as you type.
Calibration curve
Enter min. 2 data pairs (X, Y) to calculate
About this calculation
Runs in your browser
The calculation runs in your browser. Your inputs are kept in this browser's storage on this device so they are still here when you come back; Clear removes them.
Checked
Checked against: a separate normal-equations solution for all three weightings, the textbook expression for the uncertainty of the unknown, published Student t values, and the figures the Android app shows for the same data.
Calculation version 088929cdc6c2, shared with the Android app.
Worked example
Lead in drinking water by ICP-MS: seven standards from 0.5 to 50 µg/L, fitted with 1/x weighting.
y = 31.2165x + 0.245957, R² = 0.999956
Three sample readings average 268.8 kcps, so x₀ = (268.8 − 0.245957) / 31.2165 = 8.603 µg/L, with a 95 % interval of ± 0.128 µg/L. The residual standard deviation is 1.084 kcps, which gives LOD = 0.1146 µg/L and LOQ = 0.3474 µg/L.
The Load example button fills in these values.
Formula
y = b · x + a
Weighted least squares: b and a minimise Σ wᵢ · (yᵢ − b·xᵢ − a)², with wᵢ = 1, 1/xᵢ or 1/xᵢ². With the line forced through the origin, a = 0 and b = Σwxy / Σwx².
x₀ = (y₀ − a) / b
The unknown is read back from the measured signal y₀, the mean of m readings (m = 1 unless you say otherwise). Its standard uncertainty, without weighting, is
s(x₀) = (s / b) · √(1/m + 1/n + (y₀ − ȳ)² / (b² · Σ(xᵢ − x̄)²))
where s is the residual standard deviation. The 95 % interval is t · s(x₀) with n − 2 degrees of freedom (n − 1 through the origin). With weighting the same expression is used in its weighted form, and the unknown takes the weight of its own concentration.
LOD = 3.3 · s / b, LOQ = 10 · s / b
Assumptions and limits
- The response is linear over the range, the concentrations of the standards are free of error compared with the signals, and the scatter follows the chosen weighting: constant (none), variance proportional to x (1/x) or to x² (1/x²). Choose the weighting from evidence about your method, not from the best-looking fit.
- R² is 1 − (weighted residual sum of squares) / (weighted total sum of squares). Through the origin the total is taken about zero, not about the mean, so that value cannot be compared with the R² of a fit with an intercept. A high R² does not show that the low end fits: check the relative errors in the table.
- The result card is coloured by R² (green from 0.999, amber from 0.99, red below): that is the app's display convention, not a criterion. ICH Q2(R2) asks for a plot of the data, the correlation or determination coefficient, the y-intercept and the slope of the regression line, and an assessment of any non-random pattern in the residuals; it names no numeric limit for the coefficient. Judge linearity by the residuals and the relative error of each standard, against the limits your method sets.
- The residual standard deviation, and with it LOD and LOQ, is computed with the fit's own weights, normalised so that they sum to n. LOD and LOQ are the calibration-curve estimate of ICH Q2(R2); they need experimental confirmation near the estimated level.
- The confidence interval describes the calibration alone. It does not include sampling, sample preparation, dilution or the uncertainty of the standards.
- A result outside the range of the standards is an extrapolation and is marked as such. A zero standard cannot be used with 1/x or 1/x² weighting.
- Results are shown to four significant figures, the equation to six. Up to 200 standards.
References
- NIST/SEMATECH, e-Handbook of Statistical Methods: weighted least squares regression. Open the NIST section →
- Massart, Vandeginste, Buydens, De Jong, Lewi and Smeyers-Verbeke, Handbook of Chemometrics and Qualimetrics, Part A (1997), chapter 8, equation 8.28: uncertainty of a concentration predicted from a calibration line.
- ICH, Q2(R2) Validation of Analytical Procedures: detection and quantitation limits based on the calibration curve. Open ICH Q2(R2) (FDA-hosted PDF) →
The calculation is the one used by the Calibration Curve module of the LabTools Android app. The example is explained step by step in two guides:
Calibration curve guide →LOD and LOQ guide →