Free Ohm's Law calculator. Instantly calculate voltage, current, or resistance using V=IR formula. Includes examples, LED resistor calculator, and step-by-step solutions for electrical engineers.
Ohm's Law is the fundamental principle in electrical engineering that defines the relationship between voltage, current, and resistance in an electrical circuit. Discovered by German physicist Georg Simon Ohm in 1827, this law states that voltage (V) is directly proportional to current (I) multiplied by resistance (R), expressed as V = I × R.
This Ohm's Law calculator helps you instantly solve for any unknown value—whether you need to calculate voltage, current, or resistance—by entering any two known values. It's an essential tool for electrical engineers, electronics students, circuit designers, and hobbyists working with electrical circuits.
This calculator simplifies electrical circuit calculations by automatically determining the missing value when you provide any two parameters. Whether you're designing circuits, troubleshooting electronics, or calculating LED resistor values, this tool provides instant, accurate results.
Important: You must provide exactly two values. The calculator will show an error message if you enter fewer than two values or if all three fields are filled.
The calculator performs the following checks on user inputs:
If invalid inputs are detected, a helpful error message will be displayed, and the calculation will not proceed until corrected.
The primary Ohm's Law formula is expressed as:
Where:
From this primary formula, we can derive two additional forms:
To calculate Current:
To calculate Resistance:
The calculator determines which formula to use based on which two values you provide:
Scenario 1: Calculate Voltage (V)
Scenario 2: Calculate Current (I)
Scenario 3: Calculate Resistance (R)
The calculator displays the specific formula being used along with the substituted values, making it easy to understand how the result was obtained.
Calculations are performed with double-precision floating-point arithmetic to ensure accuracy. Results are displayed rounded to an appropriate number of decimal places for readability, while internal calculations maintain full precision.
This Ohm's Law calculator has numerous real-world applications in electrical engineering, electronics, and circuit design:
Circuit Design: Determine appropriate component values when designing electronic circuits. For example, calculate the required resistance for an LED current-limiting resistor given the supply voltage and desired current.
Troubleshooting and Repair: Diagnose circuit problems by verifying that voltage, current, and resistance relationships follow Ohm's Law. Deviations may indicate faulty components or wiring issues.
Component Selection: Choose appropriate resistors, power supplies, or other components by calculating the electrical parameters needed for proper circuit operation.
Education and Learning: Help students and hobbyists understand the fundamental relationship between voltage, current, and resistance through interactive calculations and experimentation.
Power Calculations: Combined with power formulas (P = V × I), Ohm's Law helps determine power consumption and heat dissipation requirements for circuit components.
Battery Life Estimation: Calculate current draw from a battery given the circuit's resistance and battery voltage, helping estimate battery life.
Safety Analysis: Ensure that circuits operate within safe current and voltage limits by verifying that all components can handle the calculated electrical parameters.
While Ohm's Law is fundamental to circuit analysis, there are other related laws and methods that electrical engineers use:
Power Law: Describes the relationship between electrical power, voltage, and current (P = V × I). Can be combined with Ohm's Law to derive additional formulas like P = I²R or P = V²/R.
Kirchhoff's Voltage Law (KVL): States that the sum of all voltages around a closed loop in a circuit equals zero. Essential for analyzing complex circuits with multiple components.
Kirchhoff's Current Law (KCL): States that the sum of currents entering a node equals the sum of currents leaving it. Used alongside Ohm's Law for circuit analysis.
Thevenin's Theorem: Allows simplification of complex circuits into equivalent circuits with a single voltage source and series resistance.
Norton's Theorem: Similar to Thevenin's but uses a current source and parallel resistance for circuit simplification.
Ohm's Law is named after Georg Simon Ohm (1789-1854), a German physicist and mathematician who published his findings in 1827 in his work "Die galvanische Kette, mathematisch bearbeitet" (The Galvanic Circuit Investigated Mathematically). Ohm's discovery was initially met with skepticism and even ridicule from the scientific community, partly because it contradicted prevailing theories of the time.
Ohm conducted meticulous experiments using newly invented precise instruments, including thermocouples that he constructed himself. Through systematic measurements, he discovered the proportional relationship between voltage and current in conductors. His work laid the foundation for the field of electrical circuit theory.
Despite initial resistance, Ohm's Law gradually gained acceptance as other scientists replicated his experiments and recognized its practical utility. The Royal Society of London awarded Ohm the Copley Medal in 1841, acknowledging the importance of his contribution. In 1881, the International Electrical Congress honored him by naming the unit of electrical resistance the "ohm."
Ohm's Law became a cornerstone of electrical engineering during the rapid expansion of electrical systems in the late 19th and early 20th centuries. It enabled engineers to design and predict the behavior of electrical circuits for applications ranging from telegraph systems to power distribution networks. Today, it remains one of the first principles taught to electrical engineering students and is essential for anyone working with electrical circuits.
The simplicity and universality of Ohm's Law make it a powerful tool that has stood the test of time, remaining just as relevant in the age of microelectronics and integrated circuits as it was in Ohm's era of basic galvanic cells and metal wires.
Ohm's Law states that the current flowing through a conductor is directly proportional to the voltage across it and inversely proportional to its resistance. The formula is V = I × R, where V is voltage in volts, I is current in amperes, and R is resistance in ohms.
To calculate voltage, multiply the current (in amperes) by the resistance (in ohms): V = I × R. For example, if current is 2 A and resistance is 5 Ω, then voltage = 2 × 5 = 10 V.
To calculate current, divide the voltage (in volts) by the resistance (in ohms): I = V / R. For example, if voltage is 12 V and resistance is 4 Ω, then current = 12 / 4 = 3 A.
To calculate resistance, divide the voltage (in volts) by the current (in amperes): R = V / I. For example, if voltage is 9 V and current is 3 A, then resistance = 9 / 3 = 3 Ω.
Voltage (V) is the electrical pressure that pushes electrons through a circuit, measured in volts. Current (I) is the flow rate of electrons through a conductor, measured in amperes. Resistance (R) is the opposition to current flow, measured in ohms. These three quantities are related by Ohm's Law (V = I × R).
Yes, but with modifications. For AC circuits, Ohm's Law uses impedance (Z) instead of resistance, which accounts for both resistance and reactance (from capacitors and inductors). The formula becomes V = I × Z, where Z is measured in ohms.
A common example is calculating the current-limiting resistor for an LED. If you have a 5V power supply, an LED with 2V forward voltage drop, and want 20mA current, you need: R = (5V - 2V) / 0.02A = 150 Ω resistor.
Ohm's Law is fundamental for circuit design, troubleshooting, component selection, and safety analysis. It allows engineers to predict circuit behavior, calculate power consumption, size components correctly, and ensure circuits operate within safe limits.
Here are code examples to calculate electrical parameters using Ohm's Law in various programming languages:
1# Python example for Ohm's Law calculations
2
3def calculate_voltage(current, resistance):
4 """Calculate voltage given current and resistance."""
5 return current * resistance
6
7def calculate_current(voltage, resistance):
8 """Calculate current given voltage and resistance."""
9 if resistance == 0:
10 raise ValueError("Resistance cannot be zero")
11 return voltage / resistance
12
13def calculate_resistance(voltage, current):
14 """Calculate resistance given voltage and current."""
15 if current == 0:
16 raise ValueError("Current cannot be zero")
17 return voltage / current
18
19# Example usage:
20# Calculate voltage
21I = 2.5 # amperes
22R = 100 # ohms
23V = calculate_voltage(I, R)
24print(f"Voltage: {V:.2f} V") # Output: Voltage: 250.00 V
25
26# Calculate current
27V = 12 # volts
28R = 4 # ohms
29I = calculate_current(V, R)
30print(f"Current: {I:.2f} A") # Output: Current: 3.00 A
31
32# Calculate resistance
33V = 9 # volts
34I = 0.5 # amperes
35R = calculate_resistance(V, I)
36print(f"Resistance: {R:.2f} Ω") # Output: Resistance: 18.00 Ω
37
1// JavaScript example for Ohm's Law calculations
2
3function calculateVoltage(current, resistance) {
4 return current * resistance;
5}
6
7function calculateCurrent(voltage, resistance) {
8 if (resistance === 0) {
9 throw new Error("Resistance cannot be zero");
10 }
11 return voltage / resistance;
12}
13
14function calculateResistance(voltage, current) {
15 if (current === 0) {
16 throw new Error("Current cannot be zero");
17 }
18 return voltage / current;
19}
20
21// Example usage:
22// Calculate voltage
23const current1 = 0.5; // amperes
24const resistance1 = 220; // ohms
25const voltage1 = calculateVoltage(current1, resistance1);
26console.log(`Voltage: ${voltage1.toFixed(2)} V`); // Output: Voltage: 110.00 V
27
28// Calculate current
29const voltage2 = 5; // volts
30const resistance2 = 1000; // ohms
31const current2 = calculateCurrent(voltage2, resistance2);
32console.log(`Current: ${current2.toFixed(4)} A`); // Output: Current: 0.0050 A
33
34// Calculate resistance
35const voltage3 = 3.3; // volts
36const current3 = 0.02; // amperes
37const resistance3 = calculateResistance(voltage3, current3);
38console.log(`Resistance: ${resistance3.toFixed(2)} Ω`); // Output: Resistance: 165.00 Ω
39
1// Java example for Ohm's Law calculations
2
3public class OhmsLawCalculator {
4
5 public static double calculateVoltage(double current, double resistance) {
6 return current * resistance;
7 }
8
9 public static double calculateCurrent(double voltage, double resistance) {
10 if (resistance == 0) {
11 throw new IllegalArgumentException("Resistance cannot be zero");
12 }
13 return voltage / resistance;
14 }
15
16 public static double calculateResistance(double voltage, double current) {
17 if (current == 0) {
18 throw new IllegalArgumentException("Current cannot be zero");
19 }
20 return voltage / current;
21 }
22
23 public static void main(String[] args) {
24 // Calculate voltage
25 double current1 = 1.5; // amperes
26 double resistance1 = 10; // ohms
27 double voltage1 = calculateVoltage(current1, resistance1);
28 System.out.printf("Voltage: %.2f V%n", voltage1); // Output: Voltage: 15.00 V
29
30 // Calculate current
31 double voltage2 = 24; // volts
32 double resistance2 = 12; // ohms
33 double current2 = calculateCurrent(voltage2, resistance2);
34 System.out.printf("Current: %.2f A%n", current2); // Output: Current: 2.00 A
35
36 // Calculate resistance
37 double voltage3 = 120; // volts
38 double current3 = 5; // amperes
39 double resistance3 = calculateResistance(voltage3, current3);
40 System.out.printf("Resistance: %.2f Ω%n", resistance3); // Output: Resistance: 24.00 Ω
41 }
42}
43
1' Excel VBA Functions for Ohm's Law calculations
2
3Function CalculateVoltage(Current As Double, Resistance As Double) As Double
4 CalculateVoltage = Current * Resistance
5End Function
6
7Function CalculateCurrent(Voltage As Double, Resistance As Double) As Variant
8 If Resistance = 0 Then
9 CalculateCurrent = CVErr(xlErrDiv0)
10 Else
11 CalculateCurrent = Voltage / Resistance
12 End If
13End Function
14
15Function CalculateResistance(Voltage As Double, Current As Double) As Variant
16 If Current = 0 Then
17 CalculateResistance = CVErr(xlErrDiv0)
18 Else
19 CalculateResistance = Voltage / Current
20 End If
21End Function
22
23' Usage in Excel cells:
24' =CalculateVoltage(2, 50) ' Returns 100 (V = I × R)
25' =CalculateCurrent(12, 6) ' Returns 2 (I = V / R)
26' =CalculateResistance(9, 3) ' Returns 3 (R = V / I)
27
These examples demonstrate how to implement Ohm's Law calculations with proper error handling for edge cases like division by zero. You can adapt these functions for your specific needs or integrate them into larger circuit analysis applications.
Example 1: Calculate Voltage
Example 2: Calculate Current
Example 3: Calculate Resistance
Example 4: LED Circuit Design
Example 5: Power Supply Current Draw
Example 6: Wire Resistance Calculation
Use this free Ohm's Law calculator to instantly solve voltage, current, and resistance calculations for your electrical circuits. Whether you're a student learning electronics fundamentals, an engineer designing circuits, or a hobbyist building projects, this tool provides accurate, instant results with step-by-step formulas. Try the calculator above and simplify your electrical engineering calculations today.
Discover more tools that might be useful for your workflow