By Kevin McAleer, 6 Minutes
Page last updated November 24, 2026

By the end of this lesson you will be able to use Ohm’s law to find the current, voltage or resistance in a simple circuit, and check the power a resistor must handle.
Ohm’s law ties voltage, current and resistance together in one tidy relationship. If you know any two, you can work out the third. It is the formula you will use most in your whole electronics life, and it is the key to choosing the resistor for our night light’s LED.
In plain text:
V = I x R voltage (volts) = current (amps) x resistance (ohms)
I = V / R current = voltage divided by resistance
R = V / I resistance = voltage divided by current
The classic memory trick is a triangle with V on top and I and R along the bottom. Cover the thing you want, and the triangle shows you the formula.
One thing to watch: the units must be volts, amps and ohms. If you have milliamps, divide by 1000 first. 10 mA is 0.010 A. Mixing mA into the formula is the number one source of wrong answers.
Not sure which version of the formula to use? Start from what you know:
flowchart TD
S["What do you want to find?"] --> A["Current I"]
S --> B["Resistance R"]
S --> C["Voltage V"]
A --> A1["I = V / R"]
B --> B1["R = V / I"]
C --> C1["V = I x R"]
Example 1: how much current? A 4.5 V battery pack across a 270 ohm resistor.
I = V / R = 4.5 / 270 = 0.0167 A = 16.7 mA
Example 2: what resistor do I need? We want 10 mA from a 4.5 V supply through a resistor alone (ignore the LED for now).
R = V / I = 4.5 / 0.010 = 450 ohm
Example 3: how much voltage across it? 0.3 mA flowing through a 10k resistor.
V = I x R = 0.0003 x 10000 = 3.0 V
A good habit: always ask whether the answer is plausible for your supply. If this had come out at 50 V on a 4.5 V battery pack, you would know you had made a mistake somewhere.
When current flows through a resistance it makes heat. The power in watts is:
P = V x I power = voltage x current
Most resistors in kits are rated 1/4 watt (0.25 W). Our LED resistor will dissipate only a few milliwatts, so we are safe, but motors and bigger loads can melt things.
Here is a small calculator we will reuse throughout the course. Save it as ohms.py, or paste it into a Python prompt.
# Run on your computer or the Pico
# A small Ohm's law helper, standard library only
def current(volts, ohms):
"""Amps flowing through a resistance with a given voltage across it."""
return volts / ohms
def resistance(volts, amps):
"""Resistance needed to pass the given current at the given voltage."""
return volts / amps
def voltage(amps, ohms):
"""Volts across a resistance with the given current through it."""
return amps * ohms
def power(volts, amps):
"""Watts of heat produced."""
return volts * amps
i = current(4.5, 270)
print(f"Current: {i * 1000:.1f} mA")
print(f"Resistance for 10 mA at 4.5 V: {resistance(4.5, 0.010):.0f} ohm")
print(f"Voltage across 10k at 0.3 mA: {voltage(0.0003, 10000):.1f} V")
print(f"Power in the 270 ohm resistor: {power(4.5, i) * 1000:.1f} mW")
Output:
Current: 16.7 mA
Resistance for 10 mA at 4.5 V: 450 ohm
Voltage across 10k at 0.3 mA: 3.0 V
Power in the 270 ohm resistor: 75.0 mW
Notice 75 mW is far below the 250 mW a quarter-watt resistor can handle. Plenty of margin.
Now try a harsher case. A 100 ohm resistor on 4.5 V passes 4.5 / 100 = 0.045 A (45 mA), so the power is 4.5 x 0.045 = 0.2 W, or 203 mW. That is just under the quarter-watt rating, so the resistor would run hot. Smaller resistance on the same voltage means much more heat.
Why this matters: every time you wire up a new part, Ohm’s law answers “how much current will this draw?” and “what resistor protects it?” before you ever switch on.
Common mistakes:
Why: The formula wants base units. 10 mA is 0.01, and 4.7k is 4700.
Quick quiz 1 of 3
A 4.7k resistor has 3.3 V across it. What current flows?
Quick quiz 2 of 3
Before using a current of 10 mA in V = I x R, what must you do?
Quick quiz 3 of 3
Which formula gives the heat a resistor produces?
Comments