Linear scaling calculator
Map values from one range to another, or use gain and offset. Useful for rescaling, linear calibration and analog signals.
How to use
Linear conversion only: y = y0 + (x − x0) × (y1 − y0) / (x1 − x0). Reversed ranges are supported. Values outside the range are extrapolated, without clamping.
Up to 128 characters per number and 16 for the optional unit. Results use finite floating-point numbers; values beyond the supported numeric range are rejected.
x = x0 + (y − y0) × (x1 − x0) / (y1 − y0)
Y = X × k + b · X = (Y − b) / k · 650 × 0.1 − 40 = 25
0–100 → 0–1: 25 → 0.25 · 4–20 mA → 0–100: 12 mA → 50