100nF

I2C pull-up resistor calculator

An I²C pull-up has a floor and a ceiling. Too small and the driver cannot sink enough current to pull the line down to a valid low. Too large and the line cannot rise fast enough through the bus capacitance for the mode you picked. Pick something in the window; the geometric middle is a fine default.

100 Ω1.0 kΩ10 kΩ100 kΩminmax2.2 kΩ
Fig 1 — Pull-up window 967 Ω to 3.5 kΩ.
Minimum (V_OL at rated sink)
967 Ω
Maximum (rise time)
3.54 kΩ
Suggested E24 value
1.80 kΩ · 153 ns rise
Rise time with 2.20 kΩ
186 ns
Low-level current per line
1.32 mA
Pull-up power, both lines low
8.70 mW
Time constant R·C_b
220 ns

How this is calculated

Standard: NXP UM10204 Rev 7 Section 7.1, Table 10; TI SLVA689

Rp(min)=VDD−VOLIOLR_{p(min)} = \frac{V_{DD} - V_{OL}}{I_{OL}}
The sink current is 3 mA in Standard and Fast mode, 20 mA in Fast-mode Plus, and V_OL is 0.4 V.
Rp(max)=tr0.8473⋅CbR_{p(max)} = \frac{t_r}{0.8473 \cdot C_b}
Maximum rise time is 1000 ns in Standard mode, 300 ns in Fast mode and 120 ns in Fast-mode Plus.
0.8473=ln⁡ ⁣(0.70.3)0.8473 = \ln\!\left(\frac{0.7}{0.3}\right)
The 30 % to 70 % portion of an RC rise, in time constants.
tr=0.8473⋅Rp⋅Cbt_r = 0.8473 \cdot R_p \cdot C_b
Rise time of a pull-up you have already picked.
Ilow=VDD−VOLRp,P=VDD⋅IlowI_{low} = \frac{V_{DD} - V_{OL}}{R_p}, \quad P = V_{DD} \cdot I_{low}
Current and power while one line is held low. SDA and SCL each have a pull-up, so a bus pays this twice.
Cb=Ndevices⋅Cpin+Ltrace⋅Cper length+CotherC_b = N_{devices} \cdot C_{pin} + L_{trace} \cdot C_{\text{per length}} + C_{other}

Assumptions

What sets the I²C pull-up window

An I²C line is open-drain. Nothing drives it high; the pull-up does, through whatever capacitance hangs on the line. That gives the resistor a floor and a ceiling, and the tool reports both.

The floor comes from the low level. When a device pulls the line down it has to sink the pull-up current and still hold the line at or below VOL. NXP UM10204 section 6.1 (Table 10) rates the driver at 3 mA for Standard- and Fast-mode, 20 mA for Fast-mode Plus, with VOL = 0.4 V. Go below Rmin and the low level creeps up towards the input threshold.

The ceiling comes from the rise time. UM10204 Table 11 limits tr to 1000 ns, 300 ns and 120 ns for the three modes, and defines it between 30 % and 70 % of VDD, not 10 % to 90 %. For an RC edge, the time between those two points is ln(0.7/0.3) = 0.8473 time constants. That constant is the whole difference between this calculator and one that multiplies by 2.2.

Both bounds, the rise time of a resistor you have already chosen, and the current and power a held-low line costs are all under How this is calculated above. SDA and SCL each need their own pull-up, so the bus pays that power twice.

Bus capacitance Cb is the total on one line: every device pin, the MCU pin, the pads and the copper. UM10204 caps it at 400 pF (550 pF for FM+). If you have not measured it, budget 10 pF per device pin (the specification's own allowance, section 6.1) plus roughly 1 pF per centimetre of trace over a ground plane. The tool builds Cb from those two terms so the estimate is at least visible.

The same formulas, with the same constants, appear in TI SLVA689, I²C Bus Pullup Resistor Calculation, section 2 and 3. The source is NXP UM10204, I²C-bus specification and user manual, section 7.1.

I2C pull-up resistor chart

The window for the common cases, computed by the calculator above from UM10204's limits: 3 mA of sink current in Standard and Fast mode, 20 mA in Fast-mode Plus, VOL of 0.4 V, and the rise-time limit of each mode against the bus capacitance. Rmin depends on the supply; Rmax does not. The last two columns are the E24 value nearest the geometric middle of the window, which is the default worth reaching for when nothing else decides it.

ModeBus CRmin 3.3 VRmin 5 VRmaxMiddle, 3.3 VMiddle, 5 V
Standard-mode, 100 kHz50 pF967 Ω1.53 kΩ23.6 kΩ4.7 kΩ6.2 kΩ
Standard-mode, 100 kHz100 pF967 Ω1.53 kΩ11.8 kΩ3.3 kΩ4.3 kΩ
Standard-mode, 100 kHz200 pF967 Ω1.53 kΩ5.90 kΩ2.4 kΩ3 kΩ
Standard-mode, 100 kHz400 pF967 Ω1.53 kΩ2.95 kΩ1.6 kΩ2.2 kΩ
Fast-mode, 400 kHz50 pF967 Ω1.53 kΩ7.08 kΩ2.7 kΩ3.3 kΩ
Fast-mode, 400 kHz100 pF967 Ω1.53 kΩ3.54 kΩ1.8 kΩ2.4 kΩ
Fast-mode, 400 kHz200 pF967 Ω1.53 kΩ1.77 kΩ1.3 kΩ1.6 kΩ
Fast-mode, 400 kHz400 pF967 Ω1.53 kΩ885 Ωno windowno window
Fast-mode Plus, 1 MHz50 pF145 Ω230 Ω2.83 kΩ620 Ω820 Ω
Fast-mode Plus, 1 MHz100 pF145 Ω230 Ω1.42 kΩ470 Ω560 Ω
Fast-mode Plus, 1 MHz200 pF145 Ω230 Ω708 Ω330 Ω390 Ω
Fast-mode Plus, 1 MHz400 pF145 Ω230 Ω354 Ω220 Ω300 Ω

Two things the chart makes plain. A Fast-mode bus at the specification's own 400 pF limit has no window at either supply: the rise time demands under 885 Ω, and the 3 mA sink current forbids anything under 967 Ω at 3.3 V or 1.53 kΩ at 5 V. The fixes are the ones listed further down, a buffer, Standard-mode, or a different bus. And Fast-mode Plus is not Fast-mode with a faster clock: its 20 mA sink is what makes a 400 pF bus possible, at the price of pull-ups in the hundreds of ohms.

Worked example: 3.3 V Fast-mode with 90 pF of bus capacitance

Fast-mode at 400 kHz, 3.3 V rail. Six devices on the bus (the MCU plus five peripherals), 30 cm of total SDA copper across a small backplane.

C_b   = 6 × 10 pF + 30 cm × 1 pF/cm = 60 + 30 = 90 pF

R_min = (3.3 − 0.4) / 3 mA
      = 2.9 / 0.003
      = 967 Ω

R_max = 300 ns / (0.8473 × 90 pF)
      = 300e-9 / 76.26e-12
      = 3.93 kΩ

Geometric middle = √(967 × 3934) = 1950 Ω  →  nearest E24: 2.0 kΩ

Fit a 2.2 kΩ (what was in the reel) and check it:

t_r   = 0.8473 × 2200 × 90e-12 = 168 ns          (limit 300 ns, fine)
I_low = 2.9 / 2200              = 1.32 mA         (limit 3 mA, fine)
P     = 3.3 × 1.32 mA           = 4.35 mW per line
Both lines held low             = 8.70 mW

The calculator gives Rmin 967 Ω, Rmax 3.93 kΩ, suggested 2.0 kΩ, and 168 ns / 1.32 mA / 4.35 mW for the 2.2 kΩ choice. The 8.7 mW is the worst case, both lines low; average power on an idle bus is close to zero since both lines sit high.

Where the I²C pull-up model stops being valid

The model is a single RC. It is right as long as the line is electrically short, which at I²C speeds is always true on a PCB, and it is right as long as the only thing pulling up is the resistor. Three things break it:

This is why the 4.7 kΩ everyone has in the drawer fails at 400 kHz. It was a fine Standard-mode value on a short 5 V bus. On the 90 pF bus above it gives 0.8473 × 4700 × 90 pF = 358 ns, already over the 300 ns limit; at 200 pF it is 796 ns and the edges are visibly rounded on a scope. At 400 pF it is 1.59 µs, which fails even Standard-mode. Fast-mode with any real bus wants something between 1 kΩ and 2.2 kΩ. The article on sizing an I²C pull-up works that window through at 3.3 V and 200 pF, and traces where the 4.7 kΩ habit came from.

Common I²C pull-up mistakes

Further reading