Ohm's Law & Electric Power Calculator
Solve V = IR for voltage, current or resistance, and get power (P = VI = I²R = V²/R) in one step.
Ohm's law and power — pick what to solve for
Show the Larzscript program that just ran
Run a calculation to see the exact program.
This is the real program the page sent to the Larzscript interpreter (compiled to WebAssembly) in your browser. The library it imports is the same code the automated tests check.
The formulas
Worked example, computed above
2 A through 6 Ω: 12 V, dissipating 24 W.
What is verified
All three power formulas (VI, I²R, V²/R) are checked to agree exactly for the same circuit, and each of V, I and R round-trips back out of the other two — see tests/test_emwaves.lz.
Frequently asked questions
What is Ohm's law?
V = IR — for a resistor, voltage equals current times resistance. 2 A through a 6 Ω resistor needs 12 V across it.
How is electric power found?
P = VI (also equal to I²R or V²/R, and this page checks all three formulas agree). A 120 V circuit drawing 8 A delivers 960 W — this is why household circuits are rated in amps, not watts, at a fixed voltage.
Why are there three power formulas?
They are algebraically equivalent given Ohm's law — P=VI combined with V=IR gives P=I²R, and combined with I=V/R gives P=V²/R. Use whichever two quantities you already know.
What if the device isn't a simple resistor?
Ohm's law only holds exactly for 'ohmic' devices (most resistors, wires); diodes, transistors and many real components have voltage/current relationships that are not a straight line, so V=IR is an approximation for those.
Every number on this page is computed by the open-source larzscript-physics library (emwaves, physmath), written in Larzscript, and checked against independent references in its test suite. How it is verified →