Ohm's Law, Voltage Dividers, and Picking an LED Resistor
- V = IR and P = VI solve almost every DC problem. Combined, they give P = I²R and P = V²/R.
- An LED series resistor is R = (Vsupply − Vforward) ÷ I. For a 3.2 V blue LED at 20 mA on 12 V that is 440 Ω, so you fit the next standard value up: 470 Ω.
- Always round up to the next E12 value. Rounding down raises the current above your target and shortens LED life.
- A voltage divider only holds its output if the load draws almost no current — a good rule is a load at least 10 times the divider's output impedance.
Safety first. Everything in this article assumes low-voltage DC — batteries, USB, or a bench supply, typically 3 V to 24 V. Mains electricity (roughly 120 V or 230 V AC) can kill you and is not a beginner project. Do not use a voltage divider to step down mains, do not open mains-powered equipment, and treat any circuit containing large capacitors as live even after it is unplugged. If a job involves house wiring, hire a licensed electrician.
Three calculations cover most of hobby electronics: how much current a resistor passes, how much heat it makes, and what value you need to protect an LED. All three come out of one equation.
What does Ohm's law actually say?
Ohm's law states that the current through a resistor is proportional to the voltage across it: V = I × R, where V is volts, I is amps, and R is ohms. Rearranged, I = V ÷ R and R = V ÷ I. The companion equation is power: P = V × I in watts. Substituting Ohm's law gives two more forms that are often more convenient, because they need only one measurement plus the resistance: P = I²R and P = V² ÷ R.
Keep your units straight. Currents in electronics are usually milliamps, and 20 mA is 0.020 A — dropping the factor of a thousand is the most common arithmetic slip in this whole area. A useful shortcut: if you work in volts, milliamps, and kilohms, the equations balance without any conversion at all. 5 V ÷ 1 kΩ = 5 mA.
| Voltage across R | Resistance | Current | Power in R |
|---|---|---|---|
| 3.3 V | 330 Ω | 10.0 mA | 33 mW |
| 5 V | 220 Ω | 22.7 mA | 114 mW |
| 12 V | 1,000 Ω | 12.0 mA | 144 mW |
| 9 V | 10,000 Ω | 0.90 mA | 8.1 mW |
The Ohm's law calculator solves for whichever of the four quantities you leave blank, so you don't have to remember which rearrangement you need.
How does a voltage divider work, and why does it sag under load?
Two resistors in series across a supply split the voltage in proportion to their values. Measured across the lower resistor:
Vout = Vin × R2 ÷ (R1 + R2)
With 9 V in and R1 = R2 = 10 kΩ, Vout is 9 × 10 ÷ 20 = 4.5 V. Straightforward — until you connect something to the output.
Anything you attach sits in parallel with R2 and lowers the effective bottom resistance. Connect a 10 kΩ load and the bottom leg becomes 10 kΩ in parallel with 10 kΩ = 5 kΩ. Now Vout = 9 × 5 ÷ 15 = 3.0 V — the output has collapsed by a third. Connect a 100 kΩ load instead and the bottom leg becomes 9.09 kΩ, giving Vout = 9 × 9.09 ÷ 19.09 = 4.29 V, only 4.7% low.
That is the whole story of divider loading. The divider's output impedance is R1 in parallel with R2 (here 5 kΩ), and the rule of thumb is that the load should be at least ten times that to keep the error in the low single-digit percent. Which leads to the standing warning: a voltage divider is a reference, not a power supply. It is right for setting a comparator threshold, scaling a sensor signal into an analogue input, or biasing a transistor. It is wrong for powering a motor, a radio module, or anything else that draws real current — use a proper regulator. The voltage divider calculator lets you enter a load resistance so you can see the sag before you build it.
One more consideration: the divider itself burns power continuously. Two 10 kΩ resistors on 9 V draw 0.45 mA and dissipate about 4 mW — trivial on a bench supply, but on a coin cell that is a flat battery in days. Higher resistor values cut the drain but raise the output impedance, making loading errors and noise worse. That trade-off is the real design decision.
How do I calculate an LED series resistor?
An LED is not a resistor. Its current rises exponentially with voltage, so past its forward voltage a tiny increase in supply causes a huge increase in current. Connect one directly across a battery and it will run away and burn out. The series resistor exists to set the current.
R = (Vsupply − Vforward) ÷ I
Worked example. A blue LED with a forward voltage of 3.2 V, run at 20 mA, from a 12 V supply:
- Voltage the resistor must drop: 12 − 3.2 = 8.8 V
- Resistance: 8.8 ÷ 0.020 = 440 Ω
- Nearest standard E12 value at or above 440 Ω: 470 Ω
- Actual current with 470 Ω: 8.8 ÷ 470 = 18.7 mA
- Power in the resistor: 8.8 × 0.0187 = 165 mW
A second example on 5 V with a red LED (Vf = 2.0 V) at 20 mA: (5 − 2.0) ÷ 0.020 = 150 Ω exactly, which is already an E12 value, dissipating 3.0 × 0.020 = 60 mW. Run both through the LED resistor calculator to check your own supply and colour.
Forward voltage depends mostly on the semiconductor chemistry, which tracks colour. Always prefer the figure on the datasheet; these are typical ranges for standard indicator LEDs at about 20 mA:
| LED colour | Typical Vf |
|---|---|
| Infrared | 1.2 – 1.6 V |
| Red | 1.8 – 2.2 V |
| Amber / orange | 2.0 – 2.2 V |
| Yellow | 2.0 – 2.4 V |
| Green (traditional) | 2.0 – 2.2 V |
| Green (pure / InGaN) | 3.0 – 3.4 V |
| Blue | 2.8 – 3.6 V |
| White | 2.8 – 3.6 V |
Two wiring notes. LEDs in series share the same current, so one resistor serves the string — but the forward voltages add, and you need the supply to exceed their sum with headroom left for the resistor. LEDs in parallel must each get their own resistor; forward voltages vary slightly between parts, and the lowest-Vf LED in a shared-resistor group hogs the current and dies first.
Which standard value do I use, and what power rating?
Resistors come in preferred series. E12 (10% tolerance) gives twelve values per decade, repeated at every power of ten: 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82. E24 (5%) adds 11, 13, 16, 20, 24, 30, 36, 43, 51, 62, 75 and 91. Calculated 440 Ω, you fit 470 Ω.
Round up, not to the nearest value. Rounding 440 down to 390 Ω would give 8.8 ÷ 390 = 22.6 mA, over the 20 mA target and eating into the LED's rated maximum. Rounding up costs you a little brightness and buys margin — and because perceived brightness is far from linear in current, the difference between 18.7 mA and 20 mA is not visible.
Then check the power rating. Common through-hole resistors are 1/4 W (250 mW) or 1/8 W (125 mW). Good practice is to run a resistor at no more than half its rating so it stays cool and its value stays stable. Our 470 Ω resistor dissipates 165 mW — that is 66% of a 1/4 W part, hot to the touch and worth upgrading to a 1/2 W. The 150 Ω resistor at 60 mW is only 24% of a 1/4 W part and perfectly happy. The resistor calculator decodes colour bands and handles series and parallel combinations when no single standard value is close enough.
Finally, resistance is not only in components. Long runs of wire have resistance too, and on low-voltage DC that shows up as voltage lost before your circuit even starts — the wire gauge calculator sizes conductors so the drop stays inside your budget, which matters for 12 V lighting and long sensor runs.
Common questions
What happens if I use a resistor value that is too large?
Nothing dangerous — the LED simply runs dimmer. Because the eye's response to light is roughly logarithmic, an LED at 10 mA looks only modestly dimmer than the same LED at 20 mA while dissipating half the power. Many designers deliberately run indicator LEDs at 5–10 mA for this reason, especially on battery power. Modern high-efficiency LEDs are clearly visible at 2 mA.
Does Ohm's law apply to everything in a circuit?
No. It applies to ohmic components — resistors, and wire, over normal conditions. Diodes, LEDs, transistors and lamps are non-linear: their resistance changes with the voltage across them, which is exactly why you cannot compute an LED's "resistance" and must work from its forward voltage instead. An incandescent bulb's cold resistance can be ten times its hot resistance, which is why filaments usually fail at switch-on.
Can I put the resistor on the cathode side instead of the anode?
Yes. Current is the same everywhere in a series loop, so a resistor before or after the LED limits it identically. The choice is usually driven by the rest of the circuit — for example, whether a microcontroller pin is sourcing or sinking the current.
Why do resistors have tolerance bands, and does it matter here?
The final band gives the manufacturing spread: gold is ±5%, silver ±10%, brown ±1%. For LED current limiting it barely matters, since a 5% swing in current produces no visible brightness change. It matters much more in voltage dividers and timing circuits, where two 5% resistors can compound into a noticeably off output — use 1% parts there.
Size it in one step. Enter supply voltage, LED forward voltage and target current to get the resistance, the nearest standard value and the power dissipated.
Open the LED Resistor Calculator →