Ohm's Law
Ohm's Law Calculator

⚡ Ohm's Law

Field: Electrical

Written and maintained by the PhDino author · Last reviewed 21 September 2026 · Checked against 4 independent reference calculations · how PhDino checks its numbers

The fundamental relationship between voltage, current, and resistance in a DC circuit.

Ohm's Law is the starting point for essentially all circuit analysis: for a resistive element, the voltage across it is directly proportional to the current through it, with resistance as the proportionality constant. Combined with the power relationship (power equals voltage times current), knowing any two of voltage, current, and resistance lets you find the other two plus power dissipated.

Key formula

V = I × R
P = V × I

Variables

V
voltage (potential difference)
I
current
R
resistance
P
power dissipated

How to use the Ohm's Law calculator

Use this whenever you know two of voltage, current and resistance and need the third, plus the power that results. It covers the everyday jobs: choosing a resistor for an LED or a sensor, checking how much current a heater or a motor winding draws, and seeing how hot a resistor will run.

Enter two values and leave the one you want at 0: it is solved from the other two, and the power is worked out from the finished set. If you fill in all three they must already agree, otherwise the calculator says so instead of showing numbers that contradict each other.

Voltage (0 = solve for it) (V)
The voltage across the component you are analysing, not necessarily the supply. In a series circuit the supply is shared among the parts, so use only the drop across the one you are asking about.
Current (0 = solve for it) (A)
The current through the component, in amperes. Convert milliamps first: 20 mA is 0.02 A. Working in milliamps against a resistance in ohms is the quickest way to be out by a factor of 1,000.
Resistance (0 = solve for it) (Ω)
The resistance in ohms. Convert kilohms first, so 4.7 kΩ is 4,700 Ω. For a real resistor remember it has a tolerance, commonly 1 to 5 percent.

Worked example: a current-limiting resistor for an LED

A red LED is to run from a 5 V supply. Its datasheet gives a forward voltage of about 2.0 V at the wanted current of 20 mA. An LED does not limit its own current, so a series resistor must take up the remaining voltage. What value, and how much power does it dissipate?

You enterValue
Voltage (0 = solve for it)3 V
Current (0 = solve for it)0.02 A
Resistance (0 = solve for it)0 Ω
The calculator returnsValue
Voltage3.00 V
Current0.02 A
Resistance150.00 Ω
Power0.06 W

Worked by hand:

  1. Voltage across the resistor. The LED takes 2.0 V, so the resistor has to drop the rest of the 5 V supply: 5 − 2.0 = 3.0 V.
  2. Current. The LED should carry 20 mA, which is 0.02 A, and it is the same current through the resistor because they are in series.
  3. Resistance. R = V ÷ I = 3.0 ÷ 0.02 = 150 Ω. Leave the resistance box at 0 and the calculator returns this.
  4. Power in the resistor. P = V × I = 3.0 × 0.02 = 0.06 W. (The same figure comes from I² × R.)
  5. Standard value. Resistors come in preferred values, and 150 Ω is one of them, so no rounding is needed.

A 150 Ω resistor sets the current to 20 mA, and at 0.06 W a common quarter-watt part runs cool. If you had reached for a 220 Ω resistor instead, the current would fall to about 13.6 mA, so the LED would be dimmer but last longer, which is a legitimate trade.

Reading the result: the three power formulas and the limits of the law

Power follows from any two of the quantities, which is why three formulas are worth knowing: P = V × I, P = I² × R and P = V² ÷ R. Use whichever matches what you already have. The I² form explains why a small rise in current heats a wire far more than intuition suggests: doubling the current quadruples the heat.

  • Ohm's law describes ordinary resistors and resistive wire, whose resistance is constant. It does not describe an LED, a diode or a transistor, whose current is not proportional to voltage, and that is exactly why the LED above needs a resistor.
  • It applies to DC and to AC circuits that are purely resistive, such as a heater element. For coils and capacitors in AC circuits use impedance, and remember that real power also depends on the power factor.
  • A resistor's power rating must exceed the power it dissipates, with margin: parts rated at exactly the dissipation run hot. Choosing a rating at least twice the calculated power is common practice.
  • A battery's terminal voltage sags under load because of its internal resistance, so the voltage you measure with nothing connected is higher than the voltage the circuit really sees.

Notes & limitations

  • To use the calculator, enter two of the three values and set the one you want to 0: it is solved from the other two. If all three are filled in they must already agree (V = I × R), otherwise the calculator says so rather than showing numbers that contradict each other.
  • This is DC (or purely resistive AC) behavior — reactive elements like inductors and capacitors need impedance (a complex-valued generalization of resistance) instead of a simple real-valued R.
  • Power dissipated as heat (P = VI = I²R = V²/R) is what determines wire gauge, heat sinking, and fuse/breaker ratings — this is the calculation behind why undersized wiring overheats.

Common mistakes

  • Using the supply voltage instead of the voltage across the component. In the LED example, dividing 5 V by 20 mA gives 250 Ω and the current comes out too low.
  • Mixing units: milliamps with ohms, or kilohms with amperes. Convert to base units (amperes, volts, ohms) before you enter anything.
  • Applying Ohm's law to a component that is not a resistor. A diode's current is not V divided by anything fixed, so the law gives a meaningless answer.
  • Ignoring the power rating. The resistor may have the right value and still overheat or fail if it cannot dissipate the power.
  • Forgetting that a value entered as zero means 'solve for this'. If a real reading of 0 A or 0 V is entered by mistake, the calculator will try to solve for it instead.

Frequently asked questions

How do I find the power from voltage and current?

Multiply them: P = V × I. If you have resistance instead, use I² × R or V² ÷ R. All three give the same answer for a resistor.

Why does the calculator want a zero for the unknown?

Because that is how it knows which value to solve for. Enter the two values you know, leave the third at zero, and it returns the missing one and the power.

Does Ohm's law work for AC?

For a purely resistive load, yes, using RMS voltage and current. Inductors and capacitors add reactance, so their behavior needs impedance rather than plain resistance.

What is the difference between a voltage drop and a supply voltage?

The supply voltage is what the source provides across the whole circuit; a voltage drop is the share used up by one part of it. Around any loop the drops add up to the supply.

Further reading

PhDino earns a commission on qualifying purchases made through this link, at no extra cost to you.

The Art of Electronics by Paul Horowitz & Winfield Hill — The standard practical reference on circuit design, from Ohm’s law to real amplifiers. (Bookshop.org UK, UK delivery only)

→ The full PhDino bookshelf on Bookshop.org (UK delivery only)

Educational tool — not a substitute for a licensed engineer or the official code text.