The Beta equation
An NTC thermistor’s resistance falls as it warms up, roughly exponentially. Datasheets give its resistance at 25 °C (R25) and a B value, which together describe the curve:
R(T) = R25 × e^(B × (1/T − 1/298.15)) T = 1 ÷ (1/298.15 + ln(R ÷ R25) ÷ B) − 273.15 (T in kelvin: °C + 273.15)
Example: a 10 kΩ B3950 thermistor at 50 °C. 1/323.15 − 1/298.15 = −0.00025948; × 3950 = −1.0249; e^−1.0249 = 0.3588; R = 10 kΩ × 0.3588 ≈ 3.59 kΩ.
B25/50 or B25/85?
B is worked out from the resistance at two temperatures, and the datasheet says which: B25/50 uses 25 and 50 °C, B25/85 uses 25 and 85 °C. The two differ slightly for the same part: Murata’s NCP18XH103F03RB is 3380 K as B25/50 and 3434 K as B25/85. Use the one whose second temperature is closer to where you measure.
Choosing the fixed resistor
In a divider, the voltage changes fastest with temperature when the fixed resistor equals the thermistor’s resistance at that temperature. So pick the resistance at the middle of the range you care about: 10 kΩ for a 10 k thermistor around room temperature, about 3.6 kΩ for 0–100 °C (3.59 kΩ at 50 °C). Further from the middle, each ADC step covers more degrees.
Which side the thermistor goes on only flips the curve: with the thermistor to GND the voltage falls as it warms, with the thermistor to the supply it rises.
Resistance of a 10 kΩ B3950 thermistor
| Temperature | Resistance | α |
|---|---|---|
| -20 °C | 105 kΩ | -6.16 %/°C |
| -10 °C | 58.2 kΩ | -5.7 %/°C |
| 0 °C | 33.6 kΩ | -5.29 %/°C |
| 10 °C | 20.2 kΩ | -4.93 %/°C |
| 20 °C | 12.5 kΩ | -4.6 %/°C |
| 30 °C | 8.04 kΩ | -4.3 %/°C |
| 40 °C | 5.3 kΩ | -4.03 %/°C |
| 50 °C | 3.59 kΩ | -3.78 %/°C |
| 60 °C | 2.49 kΩ | -3.56 %/°C |
| 70 °C | 1.76 kΩ | -3.35 %/°C |
| 80 °C | 1.27 kΩ | -3.17 %/°C |
| 90 °C | 934 Ω | -3 %/°C |
| 100 °C | 698 Ω | -2.84 %/°C |
| 110 °C | 529 Ω | -2.69 %/°C |
| 120 °C | 407 Ω | -2.56 %/°C |
Calculated with the Beta equation, R25 = 10 kΩ, B = 3950 K. α is the change in resistance per degree. Real parts follow the table in their datasheet, especially far from 25 °C.
Accuracy
Three things usually set the error. The thermistor’s tolerance: ±1 % on R25 is about ±0.26 °C near room temperature for a B 3380 part, because its resistance changes by about 3.8 % per degree there. The model: the Beta equation is exact at its two reference temperatures and drifts outside them; over a wide range, use the Steinhart–Hart equation with three calibration points. And self-heating: the divider current warms the thermistor, so keep it small, or power the divider only while measuring.
Frequently asked questions
What does B3950 mean on a thermistor?
It is the B value, 3950 K: how steeply the resistance falls with temperature. Together with the resistance at 25 °C (10 kΩ in a “10k B3950”) it defines the curve the calculator uses. The datasheet says which pair of temperatures it was measured between, for example 25/50 °C.
10 kΩ or 100 kΩ?
Pick the one whose resistance stays in a range your divider can read across your temperatures. 10 kΩ suits room, water and fridge temperatures. At 250 °C a 10 kΩ B3950 part drops to about 34 Ω, so 3D-printer hotends use 100 kΩ thermistors such as the Semitec 104GT-2, which by the Beta equation is still about 500 Ω at 200 °C.
Which fixed resistor should I use?
The thermistor’s resistance at the middle of your temperature range: then the divider is most sensitive where you measure. The calculator works it out from the range you enter and rounds it to a standard value.
NTC, PTC or DS18B20?
An NTC is cheap, small and fast, but needs a divider, an ADC and the formula. A PTC thermistor’s resistance rises with temperature, often sharply at one point, so PTCs mostly serve as resettable fuses and over-temperature switches rather than for measuring. A DS18B20 is a digital sensor: no calibration and ±0.5 °C from −10 to +85 °C according to its datasheet, but slower and limited to −55 to +125 °C.
Why are my readings off by a few degrees?
Check, in order: that R25 and B match your part; the fixed resistor’s real value; that the code assumes the same wiring (thermistor to GND or to the supply); that the ADC reference is the one the code assumes; and the ADC itself. The ESP32’s ADC is non-linear near 0 V and at the top of its range, so keep the divider voltage in the middle or use calibrated readings.
How do I wire a thermistor to an ESP32 or Arduino?
One leg of the thermistor to GND, the other to an analog pin and, through the fixed resistor, to 3.3 V (5 V on a 5 V Arduino). Add a 100 nF capacitor from the pin to GND. On an ESP32 use an ADC1 pin such as GPIO34: ADC2 can’t be used while Wi-Fi is on.