How to Use Kirchhoff's Laws to Solve Circuits with Several Batteries
Set up Kirchhoff's junction and loop equations without sign errors, choose the right number of equations and solve multi-battery circuits step by step.

How to Use Kirchhoff's Laws to Solve Circuits with Several Batteries
Series and parallel rules take you a long way with circuits, but they stop working as soon as a circuit has two batteries in different branches, or resistors arranged like a bridge. For those you need Gustav Kirchhoff's two laws from 1845. The laws themselves are simple; the difficulty is bookkeeping. This guide gives a method that avoids the usual sign errors and shows how the free Kirchhoff's laws circuit solver can check your working.
The two laws
Kirchhoff's current law (KCL). At any junction, the total current flowing in equals the total current flowing out. Charge does not pile up at a point.
Kirchhoff's voltage law (KVL). Around any closed loop, the sum of the EMFs equals the sum of the potential drops across the resistors. Energy per unit charge is conserved round the loop.
Step 1: label junctions and branches
A junction is a point where three or more wires meet. A branch is a path between two junctions that carries one current. Name the junctions (A, B, C) and number the branches. Each branch gets one unknown current, I₁, I₂, I₃ and so on.
Step 2: choose a direction for each current
Draw an arrow on every branch. It does not matter whether you guess correctly. If a current comes out negative at the end, it simply flows the other way. Students lose more marks by changing a direction halfway through than by guessing wrong at the start.
In the solver, each branch has a From and a To junction, and its current is positive from From to To.
Step 3: write the junction equations
With J junctions you get J − 1 independent KCL equations. The last one is always a combination of the others. For each junction, write the currents arriving as positive and the currents leaving as negative, and set the total to zero.
Step 4: pick independent loops
You need as many equations as unknown currents. With B branches and J junctions, the number of independent loops is B − J + 1. A simple rule on paper is to use the "windows" of the circuit diagram, the loops that have no wire crossing their middle. The solver finds loops automatically from a spanning tree, so every loop it uses is guaranteed independent.
Step 5: write the loop equations with consistent signs
Walk round each loop in one direction:
- For a resistor, add R × I if you walk the same way as the current arrow, or subtract it if you walk against the arrow.
- For a battery, add its EMF if walking takes you from its negative to its positive terminal, and subtract it otherwise.
- Set the resistor total equal to the EMF total.
Step 6: solve
You now have as many equations as unknowns. For two unknowns, substitution is fine. For three or more, write them as a matrix and use elimination. The solver's Equations tab shows the augmented matrix and every row operation, so you can compare it line by line with your own.
Worked example
Two batteries feed one load:
- Branch 1: a 12 V battery with 2 Ω internal resistance.
- Branch 2: a 4 Ω load.
- Branch 3: a 6 V battery with 3 Ω.
The positive terminals both connect to junction A and the negative terminals to junction B. There are 2 junctions and 3 branches, so 1 KCL equation and 2 loops.
KCL at A: I₁ + I₃ = I₂ (currents from both batteries arrive, the load current leaves).
Loop with battery 1 and the load: 2I₁ + 4I₂ = 12.
Loop with battery 2 and the load: 3I₃ + 4I₂ = 6.
Solving gives I₂ = 1.846 A, I₁ = 2.308 A and I₃ = −0.462 A. The negative sign means current flows into the 6 V battery: the 12 V battery is charging it. The voltage at A is 4 × 1.846 = 7.385 V, exactly 96 ÷ 13.
Load this circuit in the solver from the examples menu and you will see the same numbers, with a red arrow pointing back into the 6 V battery.
Common mistakes to avoid
- Writing one KCL equation too many. Use J − 1.
- Choosing loops that are not independent, for example the outer loop plus both inner loops. That gives three equations but only two pieces of information.
- Mixing sign conventions between loops. Pick the rule once and keep it.
- Forgetting internal resistance. It belongs in the same branch as its battery.
Checking your answer
Two checks catch most errors. First, put the currents back into a KCL equation you did not use. Second, compare the power delivered by the batteries with the power dissipated in the resistors; they must match. The solver shows the total resistor power for this purpose.
Limits
The solver models resistors and ideal batteries in DC circuits. It does not include current sources, capacitors, inductors, diodes or AC analysis, and a loop made only of zero-resistance batteries has no unique solution. Use it to learn and to check homework, not to design real electrical installations.


