A resistor is the cheapest component on your workbench. And yet a surprising number of things go wrong the moment you stop thinking carefully about it.

Not because the calculation is difficult. But because choosing a resistor means making three decisions at once: the resistance value, the power it can dissipate, and how precise it needs to be. All three are connected, and overlooking one can still cause problems.

Storage shelf with sorting trays full of THT resistors and a colour code card on the workbench

Resistance value: start with the function

The value is given in Ohms, and it determines how much current flows through the resistor at a given voltage. In practice, resistors serve one of four purposes: limiting current (for an LED), holding an input in a defined state (pull-up or pull-down), creating a voltage divider, or driving a transistor or MOSFET.

So don't start with a value — start with the question: what does this resistor need to do?

A classic example: you want to connect a red LED to 5 V. The LED has a forward voltage of around 2 V and you want 10 mA of current. The resistor needs to absorb 3 V at 10 mA — that's 300 Ω. In practice you pick the nearest standard value, like 270 Ω or 330 Ω. A slightly higher resistance means slightly less current and a slightly dimmer LED — no problem.

For a pull-up on a GPIO pin, it's not about precise current but about keeping the input in a known state. Values between 4.7 kΩ and 47 kΩ are common. A higher value draws less current; a lower value is more robust against noise and better suited for faster signals. The CRG0805F10K (10 kΩ, 1%, 0805) is a solid standard choice for pull-ups on breadboard or PCB.

Power rating: the detail everyone forgets

Every resistor has a maximum power it can dissipate as heat. The most common ratings are 0.125 W, 0.25 W, 0.5 W and higher.

The calculation: power equals voltage squared divided by resistance. For a 330 Ω resistor with 3 V across it, that's 3² / 330 = 27 mW. Well within 0.125 W — no problem at all.

But suppose you build a voltage divider from 12 V to 5 V using two 470 Ω resistors. Nearly 13 mA flows through each, dissipating around 75 mW. That technically fits within a 0.125 W resistor, but it's close to the limit. Factor in ambient temperature and poor ventilation and you're pushing it.

Rule of thumb: always choose a resistor with a power rating at least twice what you calculate. For LED driving, the CRCW0805330RFKEA (330 Ω, 1%, 0.125 W) works well. For higher power, look at the CRGH0805F10K (10 kΩ, 1%, 0.33 W).

Tolerance: when does it matter?

A 1 kΩ resistor with 5% tolerance may actually be anywhere between 950 Ω and 1050 Ω. For driving an LED or a pull-up, that's irrelevant. For a precision measurement bridge, an RC filter, or a voltage divider that provides a reference, it can matter.

In those cases, choose 1% tolerance. Metal film resistors typically offer 1% tolerance and behave more consistently across temperature than carbon film types.

For the vast majority of projects, 5% resistors are fine. Use 1% when accuracy is needed, not by default.

THT or SMD

THT resistors (through-hole, with leads) are convenient for breadboards, repairs and hand-soldered prototypes. SMD resistors are smaller and intended for PCBs.

With SMD, pay attention to the package size. A 0402 can handle around 62 mW, a 0603 slightly more, an 0805 up to 125 mW for standard types or 330 mW for higher-rated versions. If you choose an SMD resistor for an application with some power dissipation, check the datasheet — package size alone is not enough.

Where things go wrong in practice

The most common mistakes: no resistor with an LED, not calculating power and ending up with a resistor that gets hot or fails, and choosing SMD resistors that are too small for the current.

A resistor costs a few cents. The component it was supposed to protect costs considerably more. Take a moment to do the calculation.