Calculates on this device. File exports run online.
Sensor Linearization Calculator
Type calibration points: the raw reading of the sensor and the true value. The calculator fits a polynomial that turns raw readings into true values, shows the errors left and the sensor’s nonlinearity, and makes a correction table. It can also convert readings with straight lines between the points, or find a thermistor’s Steinhart–Hart coefficients and β.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose Calculate.
Your result
How it was worked out
How to use the sensor linearization calculator
- Choose a polynomial fit, a lookup table, or a thermistor.
- Type or paste the calibration points: raw reading and true value on each line (for a thermistor, resistance in ohms and temperature in °C).
- For a polynomial, choose the degree; for a lookup table or a thermistor, type the readings to convert.
- Read the coefficients, the errors left and the table; copy them into your firmware or spreadsheet.
How it works
- Polynomial: true = a0 + a1·raw + a2·raw² + …, fitted by least squares; the errors left are the differences at the points.
- Nonlinearity: the largest distance of the points from their best straight line, in % of the true-value span.
- Lookup table: between two points the true value follows the straight line through them.
- Steinhart–Hart: 1/T = A + B ln R + C (ln R)³ with T in kelvin (Steinhart and Hart, 1968); three points give an exact fit, more points a least-squares fit.
- β: ln(R1/R2) ÷ (1/T1 − 1/T2) between the first and last points.
Worked example
Six points from raw 0.10 (true 0) to 2.57 (true 50): a degree-2 fit gives true = −2.3233 + 24.2452 raw − 1.5202 raw², with at most 0.127 of error left at the points; the raw sensor is 2.61 % nonlinear. A 10 kΩ thermistor with 32,650 Ω at 0 °C, 10,000 Ω at 25 °C and 3,602 Ω at 50 °C gives A = 1.1274 × 10⁻³, B = 2.3440 × 10⁻⁴, C = 8.675 × 10⁻⁸ and β = 3891 K.
Limits you should know
- Use the curve only between the smallest and largest raw readings you calibrated: outside them a polynomial can bend away fast.
- A higher degree always fits the points better but can swing between them; keep the lowest degree whose errors are small enough.
- The errors shown are at the calibration points only; the accuracy of your reference and the sensor’s drift are not included.