I²C Pull-Up Resistor Calculator
Find the valid pull-up resistor range for an I²C bus.
Inputs
- Bus supply voltage (VDD) (V)
- Bus capacitance (pF)
- Bus speed
Notes and assumptions
- Follows the pull-up sizing method from NXP's UM10204 I²C-bus specification: Rmin from the max output low current, Rmax from the bus's allowed rise time and capacitance.
What it does
I²C lines need pull-up resistors. Too small and devices can’t pull the line low; too large and edges rise too slowly. This gives the valid range.
Where it's used
Wiring sensors, EEPROMs and displays on an I²C bus.
How to use it
- Enter the bus supply voltage.
- Estimate the total bus capacitance (about 10 pF per device plus wiring).
- Choose the bus speed.
- Pick a standard resistor inside the range.
The formula explained
- R_min
- (VDD − V_OL) / I_OL — strongest pull-up allowed
- R_max
- t_r / (0.8473 × C_b) — weakest pull-up that meets the rise time
- C_b
- total bus capacitance
Worked example
A 5 V bus at 400 kHz with about 200 pF.
Inputs:
- Bus supply voltage (VDD): 5 V
- Bus capacitance: 200 pF
- Bus speed: Fast-mode — 400 kHz
The calculator gives:
- Result: 1.533 kΩ (minimum)
- Maximum pull-up (Rmax): 1.77 kΩ
Tips and common mistakes
- Use only one set of pull-ups per bus (many modules already include them).
- 4.7 kΩ at 100 kHz and 2.2 kΩ at 400 kHz are common starting points.
- Long cables add capacitance quickly — measure or estimate generously.
Questions people ask
How are the minimum and maximum worked out?
R_min = (VDD − 0.4 V) / 3 mA, so the line can be pulled low enough. R_max = t_r / (0.8473 × C_bus), so it rises fast enough — t_r is 1000 ns at 100 kHz and 300 ns at 400 kHz. For the 5 V, 200 pF example that gives 1.53–1.77 kΩ.
What if the minimum is bigger than the maximum?
The bus has too much capacitance for that speed. Shorten the wiring, remove devices, drop to a slower speed, or add an I²C buffer or bus-extender chip.
Can I mix 3.3 V and 5 V devices on one bus?
Not directly — the pull-ups would put 5 V on the 3.3 V parts. Use a level shifter, for example the common two-MOSFET (BSS138) module, with pull-ups to each side’s own supply.
Related Embedded & Comms calculators
Enter your values to get the result with the formula, substituted values and an explanation of each step.