Pull-up resistor calculator (I²C and open drain)
Enter the supply voltage, the low-level output voltage and sink current of the weakest driver, the allowed rise time and the bus capacitance. The calculator gives the range of pull-up resistors that work and checks your chosen value against it.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Enter the supply voltage VDD and the maximum low-level voltage VOL of the weakest device on the bus.
- Enter the sink current IOL that device guarantees at VOL.
- Enter the maximum rise time and the total bus capacitance (pins, traces, cable).
- Optionally enter the resistor you plan to use, in kΩ, to check it.
- Minimum: R_min = (VDD − VOL) / IOL.
- Maximum: R_max = tr / (0.8473 × Cb), where 0.8473 = ln(0.7 / 0.3) is the time an RC edge takes to rise from 30 % to 70 % of VDD, in units of RC.
- With your resistor: sink current (VDD − VOL) / R, rise time 0.8473 × R × Cb, time constant R × Cb.
If R_min is greater than R_max, no resistor meets both limits: shorten the bus, remove devices, use a slower mode or an active pull-up or bus buffer.
Worked example
A 3.3 V bus in Fast-mode with VOL = 0.4 V, IOL = 3 mA, tr = 300 ns and Cb = 100 pF:
- R_min = 2.9 ÷ 0.003 = 967 Ω;
- R_max = 300 × 10⁻⁹ ÷ (0.8473 × 100 × 10⁻¹²) = 3,541 Ω.
A 2.2 kΩ resistor is within the range: it draws 1.318 mA when the line is low and rises in 186.4 ns.
Tips and common mistakes
- One pair per bus. Modules often carry their own pull-ups; several in parallel can drop below R_min.
- Measure capacitance if the bus is long: cables add tens of pF per metre.
- Lower is faster but costs current. Pick a value nearer R_max for low power, nearer R_min for speed.
Frequently asked questions
How do I calculate the minimum I2C pull-up resistor?
R_min = (VDD − VOL) / IOL. The driver must pull the line down to VOL or less while sinking at most IOL. At 3.3 V with VOL 0.4 V and 3 mA, R_min = 2.9 ÷ 0.003 = 966.67 Ω.
How do I calculate the maximum pull-up resistor?
R_max = tr / (0.8473 × Cb). The line charges through R into the bus capacitance, and tr is measured from 30 % to 70 % of VDD, which takes ln(0.7/0.3) = 0.8473 time constants. With 300 ns and 100 pF, R_max = 3,541 Ω.
What rise time and sink current should I enter for I2C?
The I²C specification gives a maximum rise time of 1,000 ns for Standard-mode (100 kHz), 300 ns for Fast-mode (400 kHz) and 120 ns for Fast-mode Plus (1 MHz), and a 3 mA sink current at VOL 0.4 V for Standard and Fast-mode (20 mA for Fast-mode Plus). Check your devices' datasheets.
Can I use this for a button or GPIO input?
Yes. For a button the limits are wide: the current when the button is pressed is VDD / R, and the time constant RC with the pin and wire capacitance sets how fast the line returns high. 4.7 kΩ to 10 kΩ is common; very high values pick up noise.