Source: https://mokxi.com/learn/mosfet-vs-bjt
Updated: 2026-09-27

Learn

# MOSFET or BJT? Switch the same load with both and compare

Written by the Mokxi team, updated September 27, 2026

Sign up free or see every lesson

- 192 parts on the bench
- 25 boards running now
- 1.00x real time, on every board

Click the switch to turn both on

One switch drives a 2N2222 through 1 k and an IRLZ44N directly. Each sinks a 10 ohm load.

There are two kinds of transistor you will reach for to switch a load from a board pin. A bipolar junction transistor, a BJT like the 2N2222, is switched by a current into its base. A MOSFET, like the IRLZ44N, is switched by a voltage on its gate and takes no steady current at all. Both will switch a small load happily. The difference shows up as the load grows.

The circuit above puts them side by side on the same job. One slide switch stands in for one board pin and drives both: through a 1 k resistor into the 2N2222’s base on the left, and straight onto the IRLZ44N’s gate on the right. Each switches a 10 ohm load to ground, a load that wants 5 V / 10 ohm = 500 mA, which is about what a small motor or a short LED strip draws.

Press Run, click the switch over to HIGH and read the current under each transistor. The MOSFET’s load gets 497 mA. The BJT’s gets 418 mA.

## The BJT: current in, current out

The 2N2222’s base takes (5 V - 0.8 V) / 1 k = 4.2 mA from the pin, and with a gain of about 100 that allows at most about 420 mA through the collector. The load wanted 500 mA, so the transistor is the thing limiting the current, which means it is not saturated. It sits with 0.8 V from collector to emitter and turns 0.8 V x 0.418 A = 0.33 W into heat. That is enough to make a small TO-92 package too hot to touch.

You could fix that by giving the base more current, but a board pin only has about 20 mA to give, and at 500 mA of collector current the gain of a small transistor is falling. This is the size of load where a BJT driven straight from a pin runs out of room.

## The MOSFET: voltage in, a resistor out

The IRLZ44N’s gate is a plate of metal on a thin layer of glass above the channel. Put 5 V on it and it charges, like the small capacitor it is, and after that it takes no current at all. The channel between drain and source becomes a resistor, and for this part with 5 V on the gate that resistor is about 0.022 ohms. So the load gets nearly all of its 500 mA, the MOSFET drops 0.02 V, and it dissipates 0.02 V x 0.497 A, about 10 mW. It stays cold.

That is the practical case for MOSFETs in one line: thirty times less heat on the same job, with no base resistor to size and no current taken from the pin once the gate has charged.

## Logic level is the catch

Not every MOSFET turns on properly at 5 V. Change the right-hand part’s model to an IRF540N in the properties panel. It is a popular part and a good one, but its datasheet quotes its 0.044 ohm channel at 10 V on the gate. At 5 V the engine has it at about 0.17 ohms, four times worse, and on a 3.3 V board it would barely be on. The L in IRLZ44N means logic level: it is specified to be fully on at 5 V.

The datasheet trap is the gate threshold voltage, Vgs(th). It is the voltage at which the channel just starts to pass a tiny current, often a quarter of a milliamp, not the voltage at which the part is on. Look instead for the Rds(on) figure at the gate voltage you actually have. A 2N7000, the small MOSFET in many kits, is about 2 ohms at 5 V: fine for an LED, and at 400 mA it drops nearly a volt and runs at twice its own continuous rating.

## Where a BJT is still the right choice

For loads up to a hundred milliamps or so, a 2N2222 or BC547 with a sensible base resistor saturates properly, costs almost nothing and is in every kit. It turns on at about 0.7 V, so it works from 1.8 V logic that could never turn on a MOSFET. It is also less fragile to handle: a MOSFET’s gate insulation can be punctured by static from your fingers. And for amplifying small analog signals a BJT is often the better tool.

## Common mistakes

A MOSFET with its gate left floating while the board resets. For the first moments after power-on, a board pin is an input, and a gate with nothing on it can drift halfway on and cook the MOSFET. A 10 k resistor from gate to source holds it off until the pin takes over. A small series resistor, 100 ohms or so, between the pin and the gate is also common: it limits the brief current that charges the gate at every PWM edge.

The rest are the ones above: a non-logic-level MOSFET on a 5 V or 3.3 V pin, a BJT on a load bigger than its base current can saturate, and a coil switched by either with no flyback diode across it.

## Questions

Is a MOSFET better than a BJT for switching?

For loads above a couple of hundred milliamps, usually yes: a logic-level MOSFET takes no steady gate current and drops far less voltage, so it runs cooler. For small loads a BJT with a proper base resistor works just as well and is cheaper.

What is a logic-level MOSFET?

One whose datasheet specifies its on-resistance at a gate voltage a logic pin can provide, typically 4.5 V or 5 V, and sometimes 2.5 V or 3.3 V. The IRLZ44N is one; the IRF540N, specified at 10 V, is not.

Does a MOSFET need a gate resistor?

It does not need one to set a current the way a BJT’s base does. A small series resistor of around 100 ohms is still good practice to limit the charging current at each edge, and a 10 k pull-down to hold it off while the board starts up.

Related

## Keep going

An NPN Transistor as a Switch, Driving a Motor The Flyback Diode, and the Spike It Stops Diodes for Reverse Polarity Protection PWM: Faking an Analog Voltage on a Digital Pin The MOSFET models The bipolar transistor models

## Build this for real

Open the editor, change a value and watch the number move with it. Nothing to install, and no account needed.

Start building Open the editor
