Ohm's Law | Engineering Calculator API

Posted on March 1, 2026 by Boden Bensema

Ohm's Law API

Compute voltage, current, resistance, or derived power using Ohm's Law. This endpoint is ideal for students, engineers, and developers performing circuit analysis, electrical design, or physics calculations.

Law

V=IRV = I \cdot R

Derived forms:

I=VRI = \frac{V}{R}

R=VIR = \frac{V}{I}

Power (optional derived):

P=VIP = V \cdot I

Request Body

1{ 2 "law": "ohms", 3 "vars": { 4 "V": null, 5 "V_i": null, 6 "V_f": null, 7 "I": null, 8 "I_i": null, 9 "I_f": null, 10 "R": null, 11 "R_i": null, 12 "R_f": null 13 } 14}

Variables

VariableMeaningUnit
VVoltageVolts (V)
V_iInitial voltageVolts (V)
V_fFinal voltageVolts (V)
ICurrentAmperes (A)
I_iInitial currentAmperes (A)
I_fFinal currentAmperes (A)
RResistanceOhms (Ω)
R_iInitial resistanceOhms (Ω)
R_fFinal resistanceOhms (Ω)

Behavior Notes

  • Computes missing VV, II, RR, or verifies consistency if all values are provided.

  • Supports initial and final values to automatically compute deltas for voltage, current, or resistance.

  • If all values are provided, the API checks that V=IRV=IR; inconsistency raises an error.

  • Derived power is included automatically: P=VIP=VI.

  • Division by zero (e.g., R=0R=0 when solving for current) raises an error.

Example Requests

Solve for voltage

1{ 2 "law": "ohms", 3 "vars": { 4 "I": 2, 5 "R": 10 6 } 7}

Solve for current

1{ 2 "law": "ohms", 3 "vars": { 4 "V": 12, 5 "R": 6 6 } 7}

Solve for resistance

1{ 2 "law": "ohms", 3 "vars": { 4 "V": 24, 5 "I": 4 6 } 7}

Verify consistency

1{ 2 "law": "ohms", 3 "vars": { 4 "V": 24, 5 "I": 4, 6 "R": 6 7 } 8}

Example Response

1{ 2 "solved": "V", 3 "value": 20, 4 "summary": "V = I·R = 20 V", 5 "inputs": { 6 "V": 20, 7 "I": 2, 8 "R": 10 9 }, 10 "derived": { 11 "power": 40 12 } 13}

Use Cases

  • Electrical circuit analysis

  • Determining voltage, current, or resistance in circuits

  • Physics and electronics education

  • Power calculation using derived values

  • Engineering and technical design

About the Author

This article was written by Boden Bensema, an electronics hobbyist focused on teaching beginner-friendly circuit design, breadboarding, and electronics fundamentals.

About page