How to use the transistor base resistor calculator
- Choose whether you know the load current, or want it worked out from the supply and load resistance.
- Enter the drive voltage that feeds the base resistor, and the base-emitter voltage (0.7 V is an example for silicon).
- Enter the load current, or the supply voltage, load resistance and saturation voltage Vce.
- Enter the transistor gain from the data sheet and a forced gain (10 is a common example), then read the base resistor and the next standard value down.
Formula
Base current Ib = load current / forced gain
Base resistor Rb = (drive voltage - Vbe) / Ib
From supply and load: load current = (supply voltage - Vce) / load resistance
Use the E24 value at or below Rb, which gives slightly more base current and keeps the transistor saturated
The forced gain is a design choice that is well below the transistor's gain. Driving the base harder than the minimum makes the transistor a switch that stays on for any part in the range of gains.
A 5 V drive switching 20 mA
With a drive of 5 V, a base-emitter voltage of 0.7 V, a load current of 20 mA and a forced gain of 10, the base current is 2 mA and the base resistor is (5 - 0.7) / 0.002 = 2150 ohms. The next lower E24 value is 2000 ohms, which gives 2.15 mA of base current and dissipates 8.6 mW.
A 3.3 V logic signal switching a 100 mA relay needs (3.3 - 0.7) / 0.01 = 260 ohms. For a 12 V supply with a 120 ohm load and a saturation voltage of 0.2 V, the load current is 98.33 mA and the base resistor is 437.29 ohms from a 5 V drive.
Why a forced gain
A transistor's gain varies a lot between parts and with temperature, and data sheets list a minimum. If you set the base current from the usual gain, a low-gain part will not saturate and the transistor will get hot. Using a forced gain of 10 or so means the base gets about ten times less current than the load, which is much more than the minimum needs, and saturation is certain.
The page warns you if the forced gain you choose is higher than the transistor gain you entered. To size a resistor for an LED load, use the LED resistor calculator, and to check currents and power use the Ohm's law calculator.
Standard values and extras
Resistors come in standard series. The E24 series has 24 values per decade, and the page rounds down, because a lower resistance only increases the base current. A resistor from the base to ground, often 10 times the base resistor, helps turn the transistor off cleanly. A diode across an inductive load protects the transistor from voltage spikes.
To combine resistors into a value you do not have, use the resistor network equivalent calculator.
Assumptions and limits
- The transistor is a bipolar junction transistor used as a switch, fully on or off.
- Vbe, Vce and the gain are examples or values from your data sheet at the current you use.
- The drive voltage is above Vbe, and the supply is above Vce.
- Switching speed and the heat in the transistor are not modeled.
Frequently asked questions
How do I calculate a base resistor?
Divide the load current by a forced gain of about 10 to get the base current, then divide the drive voltage minus 0.7 V by that current.
Why not use the transistor's full gain?
Gain varies between parts. Using the full gain risks a transistor that is only partly on, which wastes power and may overheat.
Should I round the resistor up or down?
Down. A smaller base resistor supplies more base current, which keeps the transistor saturated.
Does this work for MOSFETs?
No. A MOSFET gate draws almost no current, so it needs a gate resistor sized for speed and not a base resistor sized for current.