Article — Calibration Curve Calculator
Calibration Curve Calculator: Linear Regression with R², LOD, and LOQ
A calibration curve is the linear regression of instrument response against known analyte concentration. The fit returns slope (m), intercept (b), and R². The equation y = m·x + b lets you invert to x = (y − b)/m for any unknown sample response. For analytical chemistry, ICH Q2(R1) sets R² ≥ 0.99 as the linearity threshold. The limit of detection (LOD) equals 3.3·σ/S and the limit of quantification (LOQ) equals 10·σ/S, where σ is the residual standard error and S is the slope. A typical six-point UV-Vis calibration with R² of 0.9999 might have LOD of 0.005 mg/L and LOQ of 0.015 mg/L, then convert a sample absorbance of 0.275 into a concentration of 0.515 mg/L.
This calculator takes pasted (x, y) standards, runs ordinary least squares, and reports slope, intercept, R², residual standard error, and the ICH LOD/LOQ values. Enter an optional sample response and the calculator returns the predicted concentration.
What is a calibration curve
A calibration curve is the relationship between the known concentration of an analyte and the response of an instrument that measures it. Build it by running a series of standards spanning the working range, measuring the response (peak area, absorbance, signal counts), and fitting a line. The curve is then used to convert unknown sample responses into concentrations. Calibration is standard practice in UV-Vis, HPLC, GC, AAS, ICP-MS, ELISA, and almost every quantitative analytical method.
The underlying assumption is linearity in the chosen range. Most detectors have a linear range that ends in saturation at high concentration. Below the lower limit, signal-to-noise becomes the constraint. The calibration curve is only valid inside the measured range — never extrapolate.
The Beer-Lambert law (A = ε·c·l) gives a perfectly linear absorbance versus concentration relationship in dilute solutions, but real spectrophotometers deviate from linearity above absorbance of about 1 because stray light corrupts the measurement. That is why analytical chemists target absorbances between 0.2 and 0.8 — high enough to be precise, low enough to stay linear.
Calibration curve formula y = mx + b
The calibration curve formula is y = m·x + b, where y is the instrument response, x is the analyte concentration, m is the sensitivity (slope), and b is the offset (intercept). Ordinary least squares (OLS) finds the m and b that minimise the sum of squared vertical residuals between the data and the fitted line: SSE = Σ(yi − ŷi)².
The slope m has units of (response per concentration). A higher slope means a more sensitive method — small changes in concentration produce big changes in signal. The intercept b should ideally be zero (no signal at zero concentration); a small non-zero b reflects the blank response or detector offset.
m = (nΣxy − ΣxΣy) / (nΣx² − (Σx)²) slopeb = ȳ − m·x̄ interceptR² = 1 − SSE/SST fit qualityLOD = 3.3·σ/S detectionLOQ = 10·σ/S quantificationInterpreting R² on a calibration curve
R² is the fraction of variance in y explained by the linear model. R² of 0.99 means 99% of the variation in instrument response is accounted for by the calibration line; 1% is residual noise. ICH Q2(R1) and FDA bioanalytical guidance set acceptance thresholds: R² ≥ 0.99 for general analytical methods, R² ≥ 0.98 for bioanalysis.
R² alone is not enough. A perfectly straight residual plot indicates a good fit; systematic curvature in residuals — or one outlier dominating — can give a high R² that hides a model failure. Always plot the residuals and look for patterns.
Calibration curve LOD and LOQ
The calibration curve LOD and LOQ follow the ICH Q2(R1) formulas: LOD = 3.3·σ/S and LOQ = 10·σ/S. σ is the standard deviation of the residual response (an alternative is the SD of replicate blanks). S is the slope of the calibration curve. The 3.3 and 10 factors correspond approximately to signal-to-noise ratios of 3:1 (detection) and 10:1 (precise quantification).
LOD is the smallest concentration distinguishable from the blank with confidence. LOQ is the smallest concentration measurable with acceptable precision (usually RSD ≤ 15–20%). Real samples should be at or above LOQ; samples between LOD and LOQ are "detected but not quantified."
Preparing standards for a calibration curve
To prepare standards for a calibration curve, use at least five concentration levels covering the expected range of samples. ICH Q2(R1) recommends six levels with replicates. Use a single stock solution (pure analyte, weighed precisely) and serial dilutions to minimise pipetting error. Match the matrix — same solvent, same buffer, same matrix concentration — to compensate for matrix effects on the response.
Using the calibration curve to find an unknown
Using the calibration curve to find an unknown sample is straightforward: measure the sample response y, then invert the fit to x = (y − b) / m. A UV-Vis run with slope 0.539 abs per mg/L and intercept −0.003 converts an unknown absorbance of 0.275 into (0.275 − (−0.003)) / 0.539 = 0.516 mg/L. Always check the unknown response lies inside the calibration range.
If a sample response exceeds the highest standard, dilute the sample (in matrix-matched diluent) and re-measure. Never extrapolate the calibration curve above its highest point — the detector may have saturated or curved. Similarly, if a sample is below LOQ, concentrate it or use a more sensitive method.
Calibration curve validation with ICH Q2
Calibration curve validation with ICH Q2(R1) covers linearity (R² ≥ 0.99, ≥ 5 levels), range (80–120% of expected sample concentration), precision (RSD ≤ 15%, ≤ 20% at LOQ), accuracy (80–120% recovery), and limits LOD and LOQ. A validated method needs documented residual plots, outlier analysis, and intra-day plus inter-day replicates. Regulatory submissions to FDA, EMA, or PMDA reference these criteria directly.
Common calibration curve mistakes
The most common calibration curve mistake is extrapolating beyond the range — the linearity assumption only applies between the lowest and highest standards. Second mistake: using R² alone as quality criterion. A high R² can hide a curve that needs a weighted least squares fit. Third mistake: ignoring matrix effects. A standard in pure solvent will give a different slope than the same concentration in plasma or a complex food matrix.
When variance in y grows with concentration (common at high concentrations), ordinary least squares over-weights the high-concentration points and biases the slope. Use weighted least squares with weights 1/y or 1/y² to correct. Heteroscedasticity is the norm for HPLC peak areas and immunoassay signals across wide ranges.