ElectroHub

BJT Base Resistor Calculator

Used as a switch, a transistor must be driven hard enough to saturate — not merely enough to conduct. Designing for exactly I_c/h_FE leaves it in the linear region where it dissipates heat; an overdrive factor of 5 to 10 fixes that.

BJT Base Resistor (switch) — Rb = (V − Vbe)/Ib

Size the base resistor to switch a load with an NPN transistor from a logic pin (Arduino, microcontroller GPIO…).

Base current needed
Base resistor Rb
Nearest E12 value
  1. 1.Given: Vdrive = 5 V, Vbe = 0.7 V, Ic = 100 mA, hFE = 100
  2. 2.FormulaIb(min) = Ic ÷ hFESubstituteIb(min) = 0.1 ÷ 100ResultIb(min) = 1 mA
  3. 3.FormulaIb = overdrive × Ib(min) (hard saturation)SubstituteIb = 3 × 0.001ResultIb = 3 mA
  4. 4.FormulaRb = (Vdrive − Vbe) ÷ IbSubstituteRb = (5 − 0.7) ÷ 0.003ResultRb = 1.4333 kΩ
Common trap: When the BJT is a switch, don't trust hFE for the math — it varies wildly between parts and with temperature. That's exactly why the overdrive factor exists: saturate it hard so the exact β stops mattering.

The formula

I_b(min) = I_c / h_FE ; R_b = (V_drive − V_be) / (overdrive × I_b(min))

I_c
collector current the load needs (amperes)
h_FE
current gain — use the datasheet minimum, not the typical
V_drive
logic voltage driving the base (volts)
V_be
base-emitter drop, about 0.7 V for silicon
R_b
base resistor (ohms)

Worked example

Switching 100 mA with h_FE = 100 from a 5 V logic pin, overdrive 10.

  1. I_b(min) = 0.1 / 100 = 1 mA
  2. Drive at 10× : I_b = 10 mA
  3. R_b = (5 − 0.7) / 0.01 = 4.3 / 0.01

R_b = 430 Ω — but check the 10 mA is within the driving pin's rating first.

Where you'll use it

Driving relays, LEDs and small motors from a microcontroller. The calculator rejects a drive voltage at or below V_be, because no base resistor will make that transistor conduct.

The laws behind it

Parts this applies to

Related calculators