Home Improvement

DC Circuit Nodal Solver

Type one part per line to solve a resistor network with voltage and current sources.

Your numbers

One part per line as NAME NODE1 NODE2 VALUE. Names start with R (resistor), V (voltage source) or I (current source). Call the reference node 0. Values take k, meg, m, u, n, p. Example circuit.

Result

Voltage at node out

4.96552 V

3 unknown node voltages solved from 5 parts.

Nodes solved
3
Parts
5
Power supplied by sources
54.62 mW
Power absorbed by parts
54.62 mW
Largest current balance error at a node
1.30e-18 A
Supplied minus absorbed
0.00e+0 W

Node voltages (relative to node 0)

NodeVoltage
in12 V
mid7.44828 V
out4.96552 V

Part by part

PartKindFrom toVoltageCurrentPower
V1Voltage sourcein to 012 V-4.552 mA54.62 mW supplies
R1Resistorin to mid4.55172 V4.552 mA20.72 mW absorbs
R2Resistormid to 07.44828 V3.724 mA27.74 mW absorbs
R3Resistormid to out2.48276 V827.6 uA2.055 mW absorbs
R4Resistorout to 04.96552 V827.6 uA4.109 mW absorbs
How this was calculated
  1. Nodal analysis writes one equation for each unknown node: the currents leaving the node through the resistors add up to the current the sources push into it. A voltage source adds one more unknown, its own current, and one more equation fixing the voltage across it.
  2. The equations are solved by Gaussian elimination with partial pivoting. Current is counted from the first node of a part, through the part, to its second node.
  3. As checks, the currents at every node add up to zero and the power supplied by the sources equals the power absorbed by the resistors.
  • Ideal parts only: resistors, independent voltage sources and independent current sources, all steady (DC). A current source pushes current from its first node, through itself, to its second node. Wires have no resistance.

Calculated using SumPanda.com · https://sumpanda.com/dc-circuit-nodal-solver/

Results are estimates for general information. Verify important figures before relying on them.

Next step

How to use the dc circuit nodal solver

  1. Type one part per line as NAME NODE NODE VALUE, for example R1 in out 1k.
  2. Start names with R for a resistor, V for a voltage source or I for a current source, and call the reference node 0.
  3. Use suffixes k, meg, m, u, n and p for values, such as 4.7k or 2m.
  4. Read the node voltages, the current and power for each part, and the balance checks.

Formula

Resistor stamp: conductance G = 1 / R added to both nodes, minus G between them

Voltage source: an extra unknown current, and the equation V(a) - V(b) = value

Current source: pushes its current out of the first node and into the second

Solve A x = z by Gaussian elimination with partial pivoting

This is modified nodal analysis. Current is counted from the first node of a part, through the part, to the second node, and power is voltage times current, positive when absorbed.

Divider chain, bridge and current source

With V1 = 12 V into R1 = 1k, then R2 = 2k to ground in parallel with R3 = 3k and R4 = 6k in series, the middle node is at 7.448276 V and the output node at 4.965517 V. The source supplies 4.552 mA and 54.62 mW, and the same power is absorbed by the resistors.

A bridge with a 10 V source, 1k and 1k on one side, 2k and 3k on the other and a 500 ohm resistor between the midpoints puts the midpoints at 5.227273 V and 5.454545 V, with the source delivering 7.045 mA. A 2 mA current source into 1k, with 2k and 4k continuing, gives 1.714286 V and 1.142857 V.

How to write a circuit

Every line names a part and the two nodes it connects. Node names are free text such as in, mid or 3, and node 0 (or gnd) is the reference for all voltages. Voltage sources are written with the positive node first. For a current source the current leaves the first node, passes through the source and enters the second, as in SPICE. A fixed voltage source across two nodes needs a path to ground from each side.

For simpler parts of the same problem use the Ohm's law calculator, the resistor network calculator for series and parallel groups, the voltage divider calculator and the op-amp gain calculator.

Checks the page performs

After solving, the page adds the currents leaving every node, which should be zero, and compares the power supplied by the sources with the power absorbed by everything else. Both differences are tiny numbers near the limit of floating-point accuracy and are shown so you can see the solution is consistent. If the circuit has no unique answer, for example a node with nothing connected to ground, the page says so.

Assumptions and limits

  • Parts are ideal resistors, independent DC voltage sources and independent DC current sources. Wires have no resistance.
  • Suffixes follow SPICE: m means milli and meg means mega, regardless of capital letters.
  • Up to 40 parts and 30 nodes. Names must be unique and resistors must be above zero.
  • There are no capacitors, inductors, diodes, transistors or dependent sources.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

What is nodal analysis?

It is a way to solve a circuit by writing, for each node, that the currents leaving it add up to zero, in terms of the unknown node voltages. Solving all the equations together gives every voltage.

Why do I need a node called 0?

Voltages only have meaning relative to a reference. Node 0 is that reference, at zero volts. Without it the circuit could be shifted up or down by any amount and the problem would have no single answer.

What does a negative source current mean?

The current through a voltage source is counted from its first node, through it, to the second. A negative value means the source is delivering power, pushing current out of its positive terminal into the circuit.

What does it mean when no unique solution is found?

The equations are not independent. Common causes are a part or group of parts with no connection to ground, two voltage sources forced across the same pair of nodes, or a current source feeding a node with no other path.