Ohm's Law Calculator Widget

Add an Ohm's law calculator to your website. Readers type any two of voltage, current, resistance and power, pick units from microamps to kilowatts, and see the missing pair with the formula that produced it.

Electrical & Electronics Calculator Runs in your browser Free · no ads

Customize your widget

Theme
Auto follows the visitor's light/dark setting.
Style
Attribution on your page
Optional and entirely your choice. The exact line is shown in the code below; it links to the tool with rel="nofollow".
More options
Starting values
Leave blank to use the widget's defaults. Visitors can still change every value.

Live preview

Exactly what your visitors will see

Embed code

<iframe src="https://a2z.tools/embed/w/ohms-law-calculator" title="Ohm's Law Calculator by A2Z Tools" width="100%" height="740" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>

A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.

Works with

How it works

The widget follows the same rules as the A2Z Ohm's Law Calculator. Two relations link the four quantities: resistance is voltage per unit current (the SI defines the ohm as one volt per ampere) and power is voltage times current (one watt is one volt-ampere of DC). With any two known, the other two follow, so the widget needs exactly two entries and asks for one to be cleared if three are typed, because three values can contradict each other. Every value is converted to base units before any arithmetic, so 10 mA is never mistaken for 10 A, and the two answers are shown to four significant figures with a metric prefix (4.7 kohm, 81 mW) and the formula used. Negative numbers are refused rather than interpreted, since current direction is a sign convention the widget does not model. Short circuits (zero resistance with a voltage across it) and open circuits (zero current with a voltage present) are explained instead of being printed as infinity.

Calculation method

  • V = I x R, I = V / R, R = V / I (V in volts, I in amperes, R in ohms)
  • P = V x I = I^2 x R = V^2 / R (P in watts)
  • From power and resistance: V = sqrt(P x R), I = sqrt(P / R); from power and current: V = P / I, R = P / I^2
  • Inputs are converted to V, A, ohm and W first; results are shown to 4 significant figures with a metric prefix from micro to giga

Worked examples

Resistor on a 9 V battery

Inputs: V = 9 V, R = 1 kohm

Result: Current 9 mA, power 81 mW

I = 9 / 1,000 = 0.009 A; P = 9^2 / 1,000 = 0.081 W - a 1/4 W resistor is comfortably enough.

Mains heater element from its rating

Inputs: V = 230 V, P = 100 W

Result: Current 434.8 mA, resistance 529 ohm

I = P / V = 0.4348 A; R = V^2 / P = 52,900 / 100 = 529 ohm (hot resistance).

Resistor for a 3.3 V logic line at 20 mA

Inputs: V = 3.3 V, I = 20 mA

Result: Resistance 165 ohm, power 66 mW

R = 3.3 / 0.02 = 165 ohm; P = 3.3 x 0.02 = 0.066 W.

Limitations

  • Treats every component as an ideal linear resistor; diodes, LEDs, lamps whose resistance changes with temperature, and semiconductors do not obey a fixed V/I ratio.
  • For AC it is only valid for purely resistive loads with RMS values; reactance and power factor are not modelled here.
  • Negative values and sign conventions are not handled - quantities are magnitudes.
  • Displayed values are rounded to four significant figures, so chaining several results by hand can drift in the last digit.

Where publishers use it

  • Electronics tutorials and hobby blogs explaining how current, voltage and resistance relate
  • Physics revision pages for school and college students checking homework answers
  • Component shops and maker-space sites, next to resistor and LED listings
  • Training material for apprentice electricians and technicians

Questions

Why do I have to leave two fields blank?

Ohm's law and the power law link four quantities with two equations, so any two values fix the other two. If three are entered they may contradict each other, so the widget asks for exactly two.

Does it work for AC circuits?

Yes for purely resistive loads such as heaters and filament lamps, using RMS voltage and current. Motors, transformers and electronic supplies also have reactance, so their power depends on the power factor - use the electrical power calculator for those.

Why is zero resistance refused?

A voltage across zero resistance implies infinite current - a short circuit. Real circuits are limited by wiring and source resistance, which a two-value calculation cannot know.

How much current does a 100 W heater draw at 230 V?

Enter 230 V and 100 W: the current is 100 / 230 = 434.8 mA and the hot resistance is 230^2 / 100 = 529 ohm. A filament or element measured cold with a meter reads lower, because its resistance rises with temperature.

Can I enter milliamps or kilohms?

Yes. Each quantity has its own unit selector (for example uA, mA, A, kA), and the answer is shown in the most readable unit.

Why can't I use it to size an LED without a resistor?

An LED is a diode: its current rises steeply once the forward voltage is reached, so there is no fixed resistance to plug in. Use the LED resistor calculator, which applies Ohm's law only to the series resistor.

Sources

  1. The International System of Units (SI Brochure), 9th edition, table 4 - derived units with special names - Bureau International des Poids et Mesures (BIPM), 2019 . Ohm = V/A, watt = J/s, volt = W/A

Cite or recommend this tool

If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.

A2Z Tools Ohm's Law Calculator
https://a2z.tools/ohms-law-calculator

Preview