Skip to content
Omnikalc

I2C pull-up resistor calculator: range of values from the supply voltage, the bus capacitance and the speed

Enter the supply voltage, the bus capacitance and the speed mode to get the smallest and the largest pull-up resistor, a suggested value and the rise time.

Updated on
Your inputs
V

Value out of range

pF

Value out of range

Results

Suggested pull-up resistor (geometric mean)

1,850 Ω

Smallest pull-up resistor (sink current limit)
967 Ω
Largest pull-up resistor (rise time limit)
3,541 Ω
Rise time with the suggested resistor
156.8 ns
Current in the resistor when the line is low
1.57 mA
Width of the valid range (largest − smallest)
2,574 Ω
A valid range of pull-up resistors exists

The I²C bus needs a pull-up resistor on each line. The I2C pull-up resistor calculator gives the smallest value, set by the sink current, the largest value, set by the rise time and the capacitance of the bus, a suggested value between them, the rise time and the current in the resistor.

How the calculation works

  • Enter the supply voltage of the I²C bus and the total capacitance of the lines: the wires, the pins and the connectors, often 50 to 200 pF.
  • Choose the speed mode, which sets the maximum rise time allowed by the I²C specification.
  • The smallest value comes from the sink current: R(min) = (Vdd − 0.4 V) / 3 mA. The largest value comes from the rise time: R(max) = t_r / (0.8473 × C_b).
  • The calculator gives both limits, a suggested value between them (the geometric mean), the rise time it gives and the current in the resistor when the line is low.

Example

An I²C bus runs at 3.3 V in fast mode (300 ns) with a total capacitance of 100 pF. The smallest resistor is (3.3 − 0.4) / 0.003 = 967 Ω. The largest is 300 ns / (0.8473 × 100 pF) = 3,541 Ω. The suggested value is the geometric mean, 1,850 Ω, so the standard value 1.8 kΩ is a good choice. The rise time is 156.8 ns and the line draws 1.57 mA when it is low.

Why it matters

The calculator helps makers, students and embedded engineers to choose pull-up resistors for a microcontroller, sensors and displays, instead of using 4.7 kΩ for everything. A good value gives clean edges at high speed and saves power, and the calculator shows when the bus has too much capacitance for a speed mode.

Good to know

The limits come from the I²C specification for a low level of 0.4 V at 3 mA and a rise time measured from 30 % to 70 % of the supply. The internal pull-ups of a microcontroller are weak, typically 20 to 50 kΩ, and are not enough for a fast bus. The bus capacitance includes the pins of the devices, the traces and the cables, and the real values should be checked with an oscilloscope.

The UART baud rate calculator handles another serial link, the resistor calculator combines resistors, the voltage divider calculator gives a level shifter by resistors, and the capacitor calculator combines the capacitance of several parts.

Frequently asked questions

Why does the I²C bus need pull-up resistors?

The devices on an I²C bus only pull the lines low, using open-drain outputs. They never drive them high. The pull-up resistors bring the lines back to the supply voltage when no device pulls them down. This lets several devices share the same two wires without damage if two of them talk at once.

What limits the smallest resistor?

When a device pulls a line low, it must sink the current that flows through the resistor and keep the voltage under 0.4 V. The standard sink current is 3 mA, so the resistor must not be smaller than (Vdd − 0.4 V) / 3 mA. A smaller resistor would raise the low level above the limit, and it would waste current and power.

What limits the largest resistor?

The resistor and the capacitance of the bus form an RC circuit, and the line must rise from 30 % to 70 % of the supply within the maximum rise time of the mode. The 30 to 70 % rise takes 0.8473 R C, so R must stay under t_r / (0.8473 C). A larger resistor gives a slow edge that the receivers may misread.

What if the range is empty?

If the smallest value is larger than the largest, the bus is too slow for the chosen mode. The bus capacitance must be reduced by shortening the wires, removing devices or splitting the bus with a multiplexer, or the speed must be lowered. Some devices accept a higher sink current of 20 mA in fast mode plus, which lowers the smallest resistor.

Was this calculator helpful?

Thanks for your feedback!

Results are estimates provided for information purposes. They do not replace professional advice.