Ohm's law, resistor power and the resistor color code
Ohm's law states that the current through a resistor is proportional to the voltage across it: V = I × R. The power it dissipates is P = V × I = I² × R = V² / R, and its value is read from colored bands: the first digits, a multiplier and a tolerance.
Ohm's law
For a resistor, voltage V in volts, current I in amperes and resistance R in ohms (Ω) are related by
V = I × R
which can be rearranged to I = V / R and R = V / I. Plotted as current against voltage, an ideal resistor gives a straight line through the origin, and its slope is 1 / R. Real resistors follow the law closely, apart from small effects such as heating.
Example: a 100 Ω resistor across 5 V carries I = 5 / 100 = 0.05 A = 50 mA.
Power in a resistor
All the electrical power in a resistor becomes heat. Using Ohm's law, power has three equal forms:
P = V × I = I² × R = V² / R
Use whichever pair of known quantities you have. The 100 Ω resistor on 5 V dissipates 5² / 100 = 0.25 W. Each resistor has a power rating, such as 1/8 W, 1/4 W, 1/2 W or 1 W. If the dissipated power is above the rating, the resistor overheats and may burn. A good practice is to leave a margin of at least a factor of two.
Example: 12 V across 470 Ω gives I = 25.5 mA and P = 12² / 470 = 0.31 W. A 1/4 W resistor is overloaded here, so choose a 1/2 W part.
Series and parallel
In series, the same current passes through all resistors, resistances add and voltage divides in proportion:
R_total = R1 + R2 + R3
In parallel, the same voltage is across all resistors, conductances add:
1 / R_total = 1 / R1 + 1 / R2 + 1 / R3
For two resistors this is R_total = R1 × R2 / (R1 + R2). The result is always less than the smallest branch.
Example: 220 Ω and 330 Ω in series give 550 Ω, and in parallel give 220 × 330 / 550 = 132 Ω.
Example of a voltage divider: 100 Ω and 220 Ω in series on 9 V. The current is 9 / 320 = 28.1 mA. The voltages are 2.81 V and 6.19 V, and the dissipation is 79 mW and 174 mW.
Reading the four-band color code
Small resistors are marked with colored bands. In a four-band resistor the first two bands are digits, the third is a multiplier and the fourth is the tolerance. The tolerance band sits slightly apart from the others, so start reading from the opposite end.
Digit values (the multiplier is 10 to the power of this number):
- Black 0, brown 1, red 2, orange 3, yellow 4
- Green 5, blue 6, violet 7, grey 8, white 9
Additional multipliers: gold ×0.1, silver ×0.01.
Tolerance bands:
- Brown ±1%, red ±2%, green ±0.5%, blue ±0.25%, violet ±0.1%, grey ±0.05%
- Gold ±5%, silver ±10%, and no tolerance band at all means ±20%
Examples:
- Brown, black, brown, gold: 10 × 10 = 100 Ω ±5%
- Yellow, violet, red, gold: 47 × 100 = 4.7 kΩ ±5%
- Orange, orange, brown, silver: 33 × 10 = 330 Ω ±10%
Five-band code and tolerance
Precision resistors have five bands: three digits, then a multiplier, then a tolerance, typically brown (±1%) or red (±2%). The extra digit allows values such as 56.2 kΩ.
- Brown, black, black, black, brown: 100 × 1 = 100 Ω ±1%
- Green, blue, red, red, brown: 562 × 100 = 56.2 kΩ ±1%
Tolerance is the allowed deviation of the actual value from the marked value. A 100 Ω ±5% resistor can measure anywhere between 95 Ω and 105 Ω. At 5 V it passes between 47.6 mA and 52.6 mA. Use 1% or tighter parts where the exact value matters, such as dividers and precision circuits; 5% is enough for current limiting and pull-up resistors.
Worked example
You need a series resistor to put 20 mA through an LED with a 2 V drop from a 9 V supply.
1. Voltage across the resistor: 9 − 2 = 7 V. 2. Resistance: R = 7 / 0.020 = 350 Ω. The nearest standard E24 values are 360 Ω, which gives 19.4 mA, and 330 Ω (orange, orange, brown, gold), which gives 21.2 mA. 3. Power: P = 7² / 350 = 0.14 W, or 0.15 W for 330 Ω. A 1/4 W resistor is just enough with a margin of about 1.7, and a 1/2 W resistor is safer.
If the supply were 24 V, the same 20 mA would need (24 − 2) / 0.02 = 1100 Ω and dissipate 22² / 1100 = 0.44 W, so choose a 1 W resistor to keep a margin.
Try it in the resistor simulator
The resistor simulator shows a 3D resistor with Resistance, Power rating, Tolerance and Applied DC voltage as inputs. The default is 100 Ω, 5%, 0.25 W and 5 V. The live values show the Voltage drop, Current, Power dissipation and Estimated body temperature, and a voltage–current chart plots the straight Ohm's law line with dashed lines for the low and high tolerance limits. A panel shows the four-band color code for the chosen resistance and tolerance.
- With the defaults you should read 50 mA and 0.25 W, exactly at the rating.
- Raise the voltage to 6 V: 60 mA and 0.36 W, and an operating warning says the dissipated power exceeds the 0.25 W rating.
- Change Resistance to 4700 Ω, with Tolerance 5%, and check the color code against the yellow, violet, red, gold from the table above.
- Change Tolerance to 10% and see the dashed lines on the chart widen and the last band change to silver.
The color code shown is the four-band version only, with the nearest tolerance band chosen for the Tolerance you set. The five-band code is covered in this guide only.
Try it in the simulator
Frequently asked questions
- What is Ohm's law?
- Ohm's law says that the voltage across a resistor equals the current times the resistance: V = I × R. Equivalent forms are I = V / R and R = V / I.
- How do you calculate the power of a resistor?
- Use P = V × I, P = I² × R or P = V² / R. For 100 Ω on 5 V, P = 5² / 100 = 0.25 W.
- How do you read a 4-band resistor?
- The first two bands are digits, the third is a multiplier and the fourth is the tolerance. Brown, black, red, gold is 10 × 100 = 1 kΩ ±5%.
- What do the gold and silver bands mean?
- As the last band, gold means ±5% tolerance and silver ±10%. As the multiplier band, gold is ×0.1 and silver is ×0.01.
- How do you find the equivalent of resistors in parallel?
- Add the reciprocals: 1 / R_total = 1 / R1 + 1 / R2 + .... For two resistors it is R1 × R2 / (R1 + R2), and the result is smaller than either.
- What power rating should I choose?
- Calculate the dissipation with P = V² / R and choose a rating at least twice that, for cooler operation and a longer life.