New: the AI firewall watches the whole platform and explains each incident in plain words. See how it works

Two-point calibration calculator: slope and offset

Free two-point calibration calculator: slope and offset from two raw and engineering points, then convert raw counts to engineering values and back.

This two-point calibration calculator finds slope = (eng₂ − eng₁) ÷ (raw₂ − raw₁) and offset = eng₁ − slope × raw₁. Counts of 819 and 4095 for 0 and 100 % give a slope of 0.0305 and an offset of −25.

For example 819 and 4095 counts of a 12-bit input reading 4 and 20 mA, for 0 to 100 %.

Convert

Engineering value
–
Raw value
–
Slope (gain)
–
Offset
–

Engineering = slope × raw + offset.

How it works

How do you calculate slope and offset from two points?

Slope = (engineering 2 − engineering 1) ÷ (raw 2 − raw 1), and offset = engineering 1 − slope × raw 1. Then engineering = slope × raw + offset, and raw = (engineering − offset) ÷ slope.

Calibrating a sensor this way uses two reference readings, ideally near the ends of the range you care about. Values outside the two points are extrapolated on the same line.

Type in either the raw or the engineering field; the other follows.

In Hermetry A flow’s Scale block maps a raw range to an engineering range as readings arrive, for example 4–20 mA to 0–10 bar: Derived values.

Glossary Scaling (engineering units), Analog input, Sensor

Questions

Questions about the two-point calibration calculator

What are slope and offset?

The gain and zero of a linear sensor: engineering value = slope × raw + offset. Many devices and PLCs ask for exactly these two numbers.

Which two points should I use?

Two reference readings near the bottom and top of the range you measure, taken with a trusted instrument. The further apart they are, the smaller the effect of reading errors.