Kirchhoff Node/Mesh Mini Solver

Sources

Resistors

V1 and V2 have their negative terminals at 0 V. Currents are positive left to right along the top (V1 to A to B to V2) and downward through R2 and R4. Use decimal or scientific notation without unit text; changing a unit reinterprets the number.

No valid result to draw.

Show the steps

Interactive calculation is unavailable until JavaScript loads. The formulas, worked examples and references below remain available.

Solve a two-source, five-resistor circuit with node or mesh equations and see every node voltage and branch current.

How to use

Choose node analysis or mesh analysis. The answer is the same; the choice changes the headline unknown and the equations in Show the steps.

Enter the two source voltages in volts and the five resistances with their units. The V2 slider sweeps the right-hand source from −24 V to 24 V; type an exact value in the field.

Read node A's voltage or mesh current I1, then the table: the other unknowns, each branch current in its reference direction, and the power of each source and of the resistors. The arrows in the diagram show which way each current actually flows.

Copy result copies the inputs and results. Reset restores the starting circuit, the configured method and the configured resistance unit.

Science

Kirchhoff's current law (KCL): at any node, the currents flowing in add up to the currents flowing out, because charge does not pile up at a junction.

Kirchhoff's voltage law (KVL): around any closed loop, the signed voltage changes add up to zero: the rises equal the drops.

Node analysis takes one node as 0 V and writes KCL at every other node in terms of the unknown node voltages. Here that gives two equations, for VA and VB. Each branch current is a voltage difference divided by a resistance (Ohm's law, I = ΔV/R).

Mesh analysis gives each window of the circuit a clockwise loop current and writes KVL around each loop. A resistor shared by two loops carries the difference of their loop currents.

Both methods describe the same circuit, so they give the same branch currents. Node analysis needs fewer equations when there are fewer unknown node voltages than windows (a node tied to 0 V through a voltage source is already known); mesh analysis suits circuits drawn as a row of windows.

Assumptions and limits: ideal voltage sources with no internal resistance, and linear resistors with fixed values. Tolerance, temperature, wire resistance and AC behaviour are not included. A 0 Ω resistor is not accepted; enter a small value such as 0.001 Ω for a wire.

Why is a current negative? Every current has a reference arrow: left to right along the top and downward through R2 and R4. A negative value only means the current flows against its arrow; the arrows in the diagram always point the actual way.

Why can a source absorb power? When another source pushes current into a source's positive terminal, that source takes in power, as a battery does while it charges. The table shows this as a negative delivered power.

When does no current flow through R3? When nodes A and B are at the same voltage, for example with equal sources and mirror-image resistors. With the starting resistors and V1 = 12 V, this happens when V2 is also 12 V; move the V2 slider from 5 V past 12 V to see the R3 current reverse.

Does this circuit always have a solution? Yes. With positive resistors, the node and mesh equations always have exactly one solution. Larger circuits use the same steps with more equations.

Formulas

Node A (KCL): (VA − V1)/R1 + VA/R2 + (VA − VB)/R3 = 0

Node B (KCL): (VB − VA)/R3 + VB/R4 + (VB − V2)/R5 = 0

Node solution: VA = (G1·V1·G22 + G3·G5·V2)/D and VB = (G11·G5·V2 + G3·G1·V1)/D, with Gk = 1/Rk, G11 = G1 + G2 + G3, G22 = G3 + G4 + G5 and D = G11·G22 − G3²

Mesh 1 (KVL): V1 − R1·I1 − R2·(I1 − I2) = 0

Mesh 2 (KVL): R2·(I1 − I2) − R3·I2 − R4·(I2 − I3) = 0

Mesh 3 (KVL): R4·(I2 − I3) − R5·I3 − V2 = 0

Branch currents: IR1 = I1, IR2 = I1 − I2, IR3 = I2, IR4 = I2 − I3, IR5 = I3

Power balance: V1·IR1 − V2·IR5 = Σ IRk²·Rk

Examples

V1 = 12 V; V2 = 5 V; R1 = 1 kΩ; R2 = 2 kΩ; R3 = 1 kΩ; R4 = 2 kΩ; R5 = 1 kΩ (node analysis): VA = 6.667 V; VB = 4.667 V; IR3 = 2 mA from A to B. KCL at A gives 2.5·VA − VB = 12 and at B gives −VA + 2.5·VB = 5 (resistances in kΩ, currents in mA), so VA = 20/3 V and VB = 14/3 V.

The same circuit by mesh analysis: I1 = 5.333 mA; I2 = 2 mA; I3 = −333.3 µA. I3 is negative, so the current in R5 flows from V2 into node B and V2 delivers 1.667 mW. A common mistake is to read the minus sign as an error; it only means the current flows against its clockwise reference.

V1 = V2 = 12 V with the same resistors: VA = VB = 8 V; IR3 = 0 A. The circuit is a mirror image, so A and B sit at the same voltage and no current flows through R3.

V2 = 24 V with the same resistors: VA = 10.29 V; VB = 13.71 V; IR3 = −3.429 mA. With V2 above 12 V, node B is higher than node A, so the R3 current reverses and flows from B to A.

References

OpenStax University Physics Volume 2, §10.3: Kirchhoff's Rules

All About Circuits, Lessons in Electric Circuits vol. I, ch. 10: Mesh Current Method (Loop Current Method)

All About Circuits, Lessons in Electric Circuits vol. I, ch. 10: Node Voltage Method