Works on this device
I2c Pullup Resistor Calculator
The two lines of an I²C bus, SDA and SCL, are pulled high by resistors and pulled low by the devices. This calculator finds the smallest pull-up the drivers can pull low and the largest one that lets the line rise in time, lists the standard values in between, and checks the pull-up you have.
Enter your values
Check these values
Your values are worked out in this browser. They are not sent to a server.
Your result will show here
Fill in the values, then choose Calculate.
Your result
How it was worked out
How to use this calculator
- Choose what you want: the range of the pull-up, a check of the value you have, or a pull-up for a switch or an open-drain input.
- Enter the supply voltage and the bus capacitance. Choose a bus mode from the examples, or type the limits from the specification and the data sheets: the highest rise time, VOL and the sink current IOL.
- Choose a series of standard values and then Calculate.
The formulas
- Smallest pull-up: Rp min = (VDD − VOL max) ÷ IOL. A smaller resistor would need more current than the drivers can sink at VOL.
- Largest pull-up: Rp max = tr ÷ (0.8473 × Cb). The I²C specification measures the rise time from 0.3 VDD to 0.7 VDD. An RC charge takes Rp × Cb × ln(0.7 ÷ 0.3) for that, and ln(0.7 ÷ 0.3) = 0.8473.
- Several pull-ups of the same value in parallel act as one of Rp ÷ n.
- Switch or open-drain input without a rise-time limit: largest pull-up = (VDD − VIH min) ÷ leakage current; smallest = (VDD − VOL) ÷ the current allowed when low.
Worked examples
Fast-mode at 3.3 V with 100 pF: Rp min = (3.3 − 0.4) ÷ 3 mA = 967 Ω and Rp max = 300 ns ÷ (0.8473 × 100 pF) = 3,541 Ω. The E24 values from 1 kΩ to 3.3 kΩ work.
Standard-mode at 3.3 V with 200 pF: Rp max = 1000 ns ÷ (0.8473 × 200 pF) = 5,901 Ω.
Two boards with 4.7 kΩ each on a 100 pF Fast-mode bus: together they act as 2.35 kΩ. The rise time is 0.8473 × 2.35 kΩ × 100 pF = 199 ns, within 300 ns, and the drivers sink 1.23 mA. One 4.7 kΩ alone would give 398 ns, which is too slow for Fast-mode.
A button input at 3.3 V that reads high from 2.31 V, with 1 µA of leakage and 1 mA allowed when pressed: the pull-up may be from 2.9 kΩ to 990 kΩ.
Limits you should know
- The bus-mode limits in the examples come from the I²C-bus specification and user manual (NXP UM10204): rise time 1000 ns (Standard-mode), 300 ns (Fast-mode) and 120 ns (Fast-mode Plus); VOL 0.4 V at 3 mA (20 mA for Fast-mode Plus). They are examples to start from: check the edition you work to and the data sheets of your parts.
- The bus capacitance is hard to know exactly. Add the pin capacitance of every device (from the data sheets) and the capacitance of the wires or traces, and keep a margin.
- The model is an ideal RC charge with no current-source pull-up, no bus buffer and no series resistors.
- This is arithmetic for a design. It is not professional engineering advice.