Calculate voltage, current, or resistance instantly with this free Ohm's Law calculator. Enter any two values to solve V=IR. Includes practical examples, formulas, and step-by-step solutions for circuit design.
Ohm's Law defines how voltage, current, and resistance relate in electrical circuits. German physicist Georg Simon Ohm discovered this principle in 1827, establishing that voltage (V) equals current (I) multiplied by resistance (R): V = I × R.
When you're troubleshooting a circuit that won't power on, or selecting the right resistor for an LED, you're applying Ohm's Law whether you realize it or not. This calculator solves for any missing value when you provide two known parameters—eliminating manual calculations and reducing errors in circuit design, component selection, and electrical troubleshooting.
The calculator automatically determines the missing value when you provide any two known parameters. Here's what makes this straightforward:
Note: The calculator requires exactly two values. A common mistake is filling all three fields—when this happens, clear the field you want to calculate.
The calculator validates your inputs before calculating:
Error messages point you to the specific issue, making correction straightforward.
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 automatically selects the appropriate formula based on your inputs:
Scenario 1: Calculate Voltage (V)
Scenario 2: Calculate Current (I)
Scenario 3: Calculate Resistance (R)
The calculator displays both the formula and substituted values, helping you verify the calculation matches your expectations.
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.
Circuit Design and LED Projects When building an LED circuit with a 9V battery, you need to protect the LED from excessive current. If your LED requires 20mA and has a 2V forward voltage drop, the calculator quickly shows you need a 350Ω resistor (use the nearest standard value: 330Ω or 390Ω). Without this calculation, you risk burning out the LED instantly.
Troubleshooting Circuit Failures Here's what happens in practice: you measure 12V at a power supply but only 8V reaching your component. By measuring the current (say, 0.5A) and using Ohm's Law, you calculate the wire resistance causing the drop: R = 4V / 0.5A = 8Ω. This unexpectedly high resistance often points to corroded connections or undersized wiring.
Component Selection for Power Handling When selecting resistors for voltage dividers or current limiters, Ohm's Law determines both the resistance value and power rating needed. A 100Ω resistor dropping 5V carries 50mA, dissipating 0.25W—requiring at least a 0.5W rated resistor to prevent overheating.
Battery Life Calculations For portable projects, knowing your circuit draws 150mA from a 2000mAh battery helps estimate runtime: approximately 13 hours. Ohm's Law connects the resistance of your circuit to this current draw, allowing optimization before building.
Safety Verification Before prototyping, verify your calculated current won't exceed component ratings. A common error is underestimating current through low-resistance paths, which can damage ICs, traces, or create fire hazards.
Limitations: Ohm's Law applies to ohmic materials (linear conductors) under constant temperature. It doesn't directly apply to non-linear components like diodes, transistors, or thermistors without modification. For AC circuits, you'll need to account for impedance (complex resistance) rather than simple resistance.
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.
Georg Simon Ohm (1789-1854) published his mathematical description of electrical circuits in 1827, documenting what we now call Ohm's Law. The scientific community initially dismissed his work—some colleagues even ridiculed it for contradicting established theories about electricity.
What makes Ohm's story interesting: he built his own precision instruments, including custom thermocouples, because existing equipment wasn't accurate enough for his experiments. Through painstaking measurements of current flow through wires of different materials and thicknesses, he identified the proportional relationship between voltage and current.
Recognition came slowly. The Royal Society awarded him the Copley Medal in 1841, fourteen years after his publication. By 1881, the International Electrical Congress honored his contribution by naming the unit of electrical resistance the "ohm"—a fitting tribute given how fundamental this concept became to electrical engineering.
During the telegraph era and subsequent electrification of cities in the late 1800s, Ohm's Law proved indispensable. Engineers designing power distribution systems needed to predict voltage drops, calculate wire sizes, and prevent overheating. The same principles apply today whether you're troubleshooting a microcontroller circuit or designing power distribution for a data center.
What's remarkable about Ohm's Law is its staying power: despite nearly 200 years of technological advancement—from galvanic cells to integrated circuits—the fundamental relationship V = I × R remains unchanged and universally applicable to resistive circuits.
Ohm's Law describes how three electrical properties relate: voltage (electrical pressure), current (flow rate), and resistance (opposition to flow). The relationship is V = I × R. Think of it like water flowing through a pipe—voltage is the water pressure, current is the flow rate, and resistance is how much the pipe restricts flow. Increase pressure (voltage) or decrease restriction (resistance), and flow (current) increases proportionally.
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 it requires modification. For AC circuits, you'll work with impedance (Z) rather than simple resistance. Impedance accounts for both resistive and reactive components (from capacitors and inductors), creating a frequency-dependent opposition to current flow. The formula becomes V = I × Z, where Z is measured in ohms but represents a complex quantity with magnitude and phase angle.
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.
No. Ohm's Law applies specifically to ohmic materials—conductors with linear voltage-current relationships like most metals (copper, aluminum, resistors). It doesn't directly apply to non-linear components such as diodes, LEDs, transistors, batteries, or thermistors. These components require different analysis methods or circuit models. Additionally, resistance changes with temperature, so calculations assume relatively stable operating temperatures.
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 Ω
371// 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 Ω
391// 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}
431' 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)
27These 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 Drop Across a Resistor
Example 2: Calculate Current Draw from Power Supply
Example 3: Find Unknown Resistance by Measurement
Example 4: LED Circuit Design
Example 5: Power Supply Current Draw
Example 6: Wire Resistance Calculation
This free calculator eliminates manual computation errors and speeds up circuit design workflows. Enter any two known values to instantly calculate the third—perfect for verifying breadboard measurements, selecting components, or checking homework solutions. The displayed formulas show exactly how each result was calculated, making it valuable for both learning and professional work.
IEEE Standards Association. "IEEE Standard Dictionary of Electrical and Electronics Terms." Institute of Electrical and Electronics Engineers, https://standards.ieee.org/. The authoritative source for electrical engineering terminology and principles.
Plonsey, Robert, and Roger C. Barr. "Bioelectricity: A Quantitative Approach." Springer Science & Business Media, 2007. Academic textbook covering electrical principles in biological systems.
National Institute of Standards and Technology (NIST). "Constants, Units, and Uncertainty." https://www.nist.gov/pml/owm. Official SI unit definitions and measurement standards.
All About Circuits - Ohm's Law. https://www.allaboutcircuits.com/textbook/direct-current/chpt-2/voltage-current-resistance-relate/. Educational resource with detailed explanations and practical examples for electrical engineering students.
The Engineering Toolbox. "Electrical Conductivity and Resistivity." https://www.engineeringtoolbox.com/. Reference material for engineering calculations and material properties.
Discover more tools that might be useful for your workflow