Parts
2N3904 transistor: pinout, ratings, gain and substitutes
By Bulan Sarkar
The 2N3904 in TO-92 is E-B-C: hold it with the flat face toward you and the leads down, and the emitter is on the left. In SOT-23 (Nexperia's PMBT3904) pin 1 is the base, pin 2 the emitter and pin 3, the single lead on top, the collector.
It is rated 200 mA, but every datasheet below specifies its saturation voltage only up to 50 mA. Treat 50 mA as the working limit for a switch, and the worked example below shows why.
Pinout by package
Flat face toward you, leads pointing down: E, B, C from left to right.
Same order as the PN2222A, and the reverse of the BC547 and P2N2222A.
Source: Diotec Semiconductor 2N3904 General Purpose NPN Transistors, p. 1 (TO-92 drawing with leads 1, 2, 3 and symbol: E (1), B (2), C (3))
Flat face toward you, leads pointing down: pins 1, 2, 3 from left to right.
Source: Micro Commercial Components 2N3904 NPN General Purpose Amplifier (TO-92), p. 1 (TO-92 outline numbered 1 2 3; 1 emitter, 2 base, 3 collector)
Top view, marking readable, single lead at the top: pin 1 bottom left, pin 2 bottom right, pin 3 on top.
Source: Nexperia PMBT3904 40 V, 200 mA NPN switching transistor, p. 1 (Table 2, pinning: 1 base, 2 emitter, 3 collector); Nexperia PMBT3904 40 V, 200 mA NPN switching transistor, p. 2 (Table 4, marking code %1A)
Which one do you have?
A TO-92 printed 2N3904 is the through-hole part, and every maker checked here uses the same E-B-C order. A three-lead SMD part marked 1A (Nexperia adds a one-character site code in front) is the PMBT3904, the SOT-23 version, with pins numbered base, emitter, collector.
If the print is worn or the bag says only "NPN", a 2N3904 and a BC547 look the same and have opposite pin orders. Meter it, as described further down, before you solder it.
Absolute maximum ratings
The three datasheets agree on the voltages: 40 V collector to emitter, 60 V collector to base and 6 V emitter to base. The TO-92 parts are rated 625 mW at 25 °C; the SOT-23 is rated 250 mW, because its body and pads shed heat far less well (500 K/W against 200).
| Parameter | 2N3904TO-92 | 2N3904TO-92 | PMBT3904SOT-23 |
|---|---|---|---|
| Collector-emitter voltage VCEO | 40 V | 40 V | 40 V |
| Collector-base voltage VCBO | 60 V | 60 V | 60 V |
| Emitter-base voltage VEBO | 6 V | 6 V | 6 V |
| Collector current, continuous IC | 200 mA | 200 mA | 200 mA (200 mA peak, 1 ms) |
| Power dissipation at 25 °C ambient Ptot | 625 mW (3 mm² copper per lead) | 625 mW | 250 mW (FR4, standard footprint) |
| Thermal resistance, junction to air RθJA | 200 K/W (typical) | 200 °C/W | 500 K/W |
| Junction temperature TJ | −55 to 150 °C | −55 to 150 °C | 150 °C max |
The 6 V emitter-base rating is lower than it looks. Drive the base from a signal that swings negative, such as a transformer winding or an AC-coupled square wave, and a reverse 6 V can break the junction down. A small diode with its anode on the emitter and its cathode on the base clamps it.
Gain, saturation and speed
| Parameter | 2N3904TO-92 | 2N3904TO-92 | PMBT3904SOT-23 |
|---|---|---|---|
| DC current gain hFEIC = 0.1 mA, VCE = 1 V | 40 min | 40 min | 60 min |
| DC current gain hFEIC = 1 mA, VCE = 1 V | 70 min | 70 min | 80 min |
| DC current gain hFEIC = 10 mA, VCE = 1 V | 100 to 300 | 100 to 300 | 100 to 300 |
| DC current gain hFEIC = 50 mA, VCE = 1 V | 60 min | 60 min | 60 min |
| DC current gain hFEIC = 100 mA, VCE = 1 V | 30 min | 30 min | 30 min |
| Saturation voltage VCE(sat)IC = 10 mA, IB = 1 mA | 0.2 V max | 0.2 V max | 0.2 V max |
| Saturation voltage VCE(sat)IC = 50 mA, IB = 5 mA | 0.3 V max | 0.4 V max | 0.3 V max |
| Base-emitter voltage in saturation VBE(sat)IC = 10 mA, IB = 1 mA | 0.65 to 0.85 V | 0.65 to 0.85 V | 0.65 to 0.85 V |
| Base-emitter voltage in saturation VBE(sat)IC = 50 mA, IB = 5 mA | 0.95 V max | 0.95 V max | 0.95 V max |
| Transition frequency fTIC = 10 mA, VCE = 20 V, f = 100 MHz | 300 MHz min | 250 MHz min | 300 MHz min |
| Collector-base capacitance CoboVCB = 5 V, f = 1 MHz | 4 pF max | 4 pF max | 4 pF max |
| Storage time tsIC = 10 mA, IB1 = IB2 = 1 mA | 200 ns max | 200 ns max | 200 ns max |
The gain peaks around 10 mA. Between 100 and 300 is guaranteed there, and only 60 at 50 mA and 30 at 100 mA. The familiar "hFE 100 to 300" holds only at that best current. Design a 100 mA switch around it and you are three times too optimistic.
The makers part company in two places. MCC allows 0.4 V of saturation voltage at 50 mA where Diotec and Nexperia allow 0.3 V, and MCC guarantees 250 MHz where the others guarantee 300 MHz. Neither matters for a relay driver, but if you are sizing a part for an RF stage, design with MCC's figures and any maker's part will do.
The switching times are short: 35 ns delay, 35 ns rise, 200 ns storage and 50 ns fall at 10 mA. Storage time dominates. PWM at a few tens of kilohertz is comfortable, and the 2N3904 is a common choice for the level shifter in front of a MOSFET gate.
What it is good for
- Switching a small relay, a buzzer, an LED or a short LED string from a microcontroller pin, up to 50 mA. The BJT as a switch lesson covers the theory.
- Small-signal amplifiers around 1 to 10 mA, where its gain is highest, such as a common-emitter stage.
- Logic level shifting, pulse stretching and oscillators up to tens of megahertz.
Above 50 mA, use a PN2222A (same pins, rated 1 A) or a logic-level MOSFET. The 2N2222 page has its pinouts, and the trap in them.
Worked example: switching a 50 mA load
A 12 V load drawing 50 mA, say a relay whose coil measures 240 Ω, switched from a 5 V microcontroller pin. The emitter goes to ground, the coil sits between +12 V and the collector, and a resistor feeds the base from the pin.
1. Pick the base current. The datasheets specify saturation at 50 mA with 5 mA of base current, a ratio of ten: 50 mA / 10 = 5 mA.
2. Take the worst-case base-emitter voltage. VBE(sat) is at most 0.95 V at that current. The highest value leaves the least voltage across the resistor: R ≤ (5 − 0.95) V / 5 mA = 810 Ω.
3. Round down to a standard value. The next E12 value below is 680 Ω. The base current is then 5.96 mA if VBE is 0.95 V and 6.4 mA if it is 0.65 V, the lowest the datasheets give.
4. Check against the guaranteed gain. At the lowest base current, the minimum hFE of 60 at 50 mA could carry 357 mA. The load needs 50 mA, so the transistor is driven well into saturation.
5. Check the heat. At most 50 mA × 0.4 V (MCC's limit) plus 6.4 mA × 0.95 V = 26 mW. At 200 °C/W the junction runs about 5.2 °C above the air. The resistor dissipates 28 mW.
From a 3.3 V pin the same working gives R ≤ 470 Ω, which is itself an E12 value, so 470 Ω and a base current of 5.0 to 5.6 mA. Most microcontroller pins can supply that, but check your chip's per-pin and total limits first.
A relay coil or motor needs the diode across it (cathode to +12 V), or the spike at switch-off can pass the 40 V rating; see the flyback diode and relay driving.
Worked example in numbers
- Base resistor
- 680 Ω
- Base current
- 6.0 to 6.4 mA
- Transistor heat
- 26 mW
- Junction rise
- 5.2 °C
Tips and checks
- Read "rated 200 mA" as "survives 200 mA". The datasheets specify saturation only to 50 mA, so above that nobody tells you the voltage across the transistor or how hot it runs.
- Measure the voltage from collector to emitter with the load on. Under 0.3 V means the switch is saturated; a volt or more means the base is starved.
- Keep the 10 kΩ from base to emitter. Without it a floating pin during reset can half turn the transistor on and cook it slowly.
- For an LED, size the series resistor with the 0.2 V saturation voltage subtracted from the supply. The LED resistor calculator does the rest.
- A loose TO-92 marked only "3904" is almost always E-B-C, but a quick diode test costs ten seconds and saves a board.
Substitutes, and the pin-order trap
The PN2222A is the drop-in upgrade: same E-B-C order, five times the current. The P2N2222A and the BC547 both use the opposite order, C-B-E, so they go in the other way round.
| Part | Pins | Verdict |
|---|---|---|
| PN2222A | E-B-C | Same pin order, same 40 V, and rated 1 A with saturation specified up to 500 mA. The safe upgrade when a 2N3904 runs out of current.onsemi (Fairchild) PN2222A / MMBT2222A / PZT2222A, p. 1 |
| P2N2222A | C-B-E | Electrically a step up (600 mA), but the pins are the reverse of the 2N3904. Turn it round so the flat face points the other way, then meter it.onsemi P2N2222A/D, p. 6 |
| BC547 | C-B-E | Reversed pins and half the current: 100 mA. Fine for signal work and loads of a few tens of milliamps, not for the 50 mA example on this page with any margin.Diotec Semiconductor BC546 ... BC549 General Purpose NPN Transistors, p. 1 |
Finding the pins with a multimeter
- Set the meter to diode test. With the red probe on one lead, find the lead that conducts to both others, each reading about 0.6 to 0.7 V. That lead is the base, and the part is NPN.
- Reverse the probes: both junctions should read open. The two outer leads should read open both ways.
- The base-emitter reading is usually a few millivolts higher than the base-collector one. If your meter has an hFE socket, try the part both ways round; the orientation with the higher reading is the right one.
The transistor testing lesson goes through it step by step, and continuity and diode test explains what the meter is measuring.
What we'd do
Keep a strip of 2N3904s for anything under 50 mA: relay drivers for small relays, LED switching, level shifters. For a load between 50 mA and 500 mA, fit a PN2222A in the same footprint. Above that, or from a 3.3 V pin that cannot spare 5 mA, go to a logic-level MOSFET (the MOSFET as a switch).
Questions people ask
What is the 2N3904 pinout?
In TO-92, with the flat face toward you and the leads down: emitter, base, collector from left to right. In SOT-23 (PMBT3904): pin 1 base, pin 2 emitter, pin 3 collector.
How much current can a 2N3904 switch?
It is rated 200 mA, but saturation is only specified up to 50 mA, with 5 mA of base current. Use 50 mA as the switching limit.
Is the 2N3904 the same as the 2N2222?
No. Both are 40 V NPN parts, and the 2N3904 shares the PN2222A's E-B-C order, but the PN2222A is rated 1 A and has saturation specified to 500 mA. The 2N3904 is rated 200 mA and specified to 50 mA.
Can I use a BC547 instead of a 2N3904?
For loads under about 50 mA, yes, but the BC547 is C-B-E, so it goes in the other way round. It is rated only 100 mA.
What is the PNP version of the 2N3904?
The 2N3906. Diotec's datasheet names it as the complementary part, and Nexperia names the PMBT3906 for the SOT-23 version.
Buying 2N3904 transistors in India
onsemi's product page for its own 2N3904 listed all nine orderable versions as obsolete when we checked on 9 October 2026. Diotec, which revised its datasheet in March 2026, MCC and Nexperia (PMBT3904) still publish theirs. Buy from a seller who names the maker, and meter a sample from every new bag. Our guide to buying electronic components in India compares ten online sellers and covers how to spot fakes.
One email a month from the bench
New circuits, lessons, part guides and calculators, on the first Sunday of each month.
Lessons that go deeper
Datasheets this page was checked against
- Diotec Semiconductor, 2N3904 General Purpose NPN Transistors (Version 2026-03-10)
- Micro Commercial Components, 2N3904 NPN General Purpose Amplifier (TO-92) (Rev.3-2-12012020)
- Nexperia, PMBT3904 40 V, 200 mA NPN switching transistor (Product data sheet, 16 February 2024)
- onsemi, P2N2222A/D (Rev. 7, January 2013)
- onsemi (Fairchild), PN2222A / MMBT2222A / PZT2222A (Rev. A3, August 2010)
- Diotec Semiconductor, BC546 ... BC549 General Purpose NPN Transistors (Version 2026-03-30)
Makers revise datasheets. If the copy you download has a newer revision and a number here disagrees with it, the datasheet wins, and we would like to hear about it.
