Home / Science / Engineering / Energy and power systems / Load flow for small networksTool #674

Load flow (power flow) calculator: Newton-Raphson and Gauss-Seidel for small power networks, in your browser

Type or open bus and line tables, and solve the AC power flow in per unit by Newton-Raphson or Gauss-Seidel. Get every bus voltage and angle, line flows at both ends, losses and a single-line diagram. Nothing is uploaded.

Keep it one tap away for everyday use.

Bookmark Load flow for small networks?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Buses, lines
  2. Solve
  3. Voltages
  4. Line flows
Nothing is uploadedWorks offline once open

Network

Slack: holds its voltage and angle (0°) and makes up whatever power is missing. PV: a generator that holds its voltage and sends a set real power. PQ: a load bus; its voltage is worked out. The set voltage is ignored for PQ buses.

Tolerance: the largest power mismatch allowed at any bus when the solution stops. Newton-Raphson usually needs 3 to 6 iterations; Gauss-Seidel needs many more (try 500), and an acceleration factor of 1.4 to 1.7 speeds it up. Up to 300 buses.

What it does

A load flow (or power flow) finds the steady state of an AC power network: the voltage and angle at every bus, and the real and reactive power on every line, for a given pattern of generation and load. It is the first calculation in almost every power system study, from checking that voltages stay within limits to seeing which line is the most heavily loaded and how much power is lost as heat.

This tool solves it in per unit for small networks (up to 300 buses), entirely in your browser:

  • builds the bus admittance matrix (Ybus) from the lines, with half the line charging at each end;
  • solves by Newton-Raphson (polar form, full Jacobian, usually 3 to 6 iterations) or Gauss-Seidel (simpler, many more iterations, with an acceleration factor);
  • shows every bus voltage and angle, the power each generator supplies, each line’s flow at both ends, its losses and current, and the total losses;
  • draws a single-line diagram with power-flow arrows and a convergence chart, and gives CSV, PNG, PDF and Word downloads.

For study and planning, not a substitute for professional judgement.

How to use it

  1. Buses, one per line: name, type, load P (MW), load Q (Mvar), generation P (MW), set voltage (pu). Commas, tabs or spaces all work, and a header row is skipped.
    • slack: exactly one. It holds its voltage at the set value and angle at 0°, and supplies whatever the rest of the network needs, including the losses.
    • PV: a generator bus that sends a set real power and holds a set voltage magnitude; the tool works out the reactive power it must give.
    • PQ: a load bus with known P and Q; its voltage is the unknown. The set voltage is ignored (the start is 1.0 pu).
  2. Lines: from, to, R, X, B in per unit on the base you give. B is the total line charging; leave it out for 0. Parallel lines are fine.
  3. Pick the method, tolerance and most iterations. Or press Use the example, or open CSV or Excel files.

Worked example

The made-up example has 5 buses on a 100 MVA base: bus 1 is the slack at 1.03 pu, bus 2 a generator sending 80 MW at 1.01 pu with 30 MW of local load, and buses 3, 4 and 5 are loads of 55, 40 and 65 MW. Newton-Raphson converges in 4 iterations, with total losses of 4.562 MW. The slack bus supplies 114.56 MW and 35.72 Mvar, and bus 2’s generator gives 32.76 Mvar to hold 1.01 pu. The lowest voltage is 0.9514 pu at bus 5, at −7.371°. The busiest line is 2–3, carrying 77.99 MW out of bus 2 and losing 1.722 MW. Switching to Gauss-Seidel (acceleration factor 1.6) gives the same answer after 36 iterations, or 47 with no acceleration.

Tips

  • Keep R, X and B on one base. To convert ohms: Z(pu) = Z(Ω) × S_base / V_base².
  • If Newton-Raphson does not converge, the loading may be beyond what the network can carry (no solution), or a value may be in the wrong units.
  • Generator reactive limits and transformer taps are not modelled; check that each PV bus’s Q is something its generator can give.

FAQ

Why per unit? It puts every voltage near 1 and makes transformers disappear from the equations, so mistakes stand out.

Why does the slack bus supply more than the load minus the other generators? It also covers the losses in the lines.

Is my network uploaded? No. Everything runs in your browser and works offline.

Where the numbers come from

  • Own code: bus admittance matrix, polar Newton-Raphson with the full Jacobian, and Gauss-Seidel with acceleration, as set out in standard power system analysis textbooks (general engineering methods).
  • Checked against an independent NumPy Newton-Raphson written for this tool (complex admittance matrix, MATPOWER-style dS/dV Jacobian) on the example and on random networks: voltages to 1e-7 pu, angles to 1e-5°, flows to 1e-4 MW.
  • The 5-bus example network is made up for fibub; it is not an IEEE or textbook test case.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

Home battery storage sizing #675 Simulate a home battery hour by hour with your load and solar data (or a made-up template year), sweep battery sizes, and see self-consumption, grid import and export, cycles, backup hours and a recommended size. Nothing is uploaded. Levelised cost of energy (LCOE) #676 Work out the levelised cost of energy of a solar, wind, gas or any other plant from capital cost, fixed and variable O&M, fuel, output loss, discount rate, lifetime and capacity factor, with a yearly cash-flow table, a cost breakdown and a tornado chart. Nothing is uploaded. Solar PV yield estimator #672 Give a place, the panels' tilt and direction, the system size and losses, and get an hour-by-hour clear-sky year (sun position, Haurwitz clear sky, Erbs split, isotropic sky on the tilted panels), scaled by your own sunshine estimate: yearly and monthly energy, specific yield, capacity factor and the best tilt. Wind turbine energy yield #673 Paste or open wind speed readings (or give Weibull k and c, or a mean speed), correct them to hub height with the power or log law, adjust for air density, and combine with a power curve to get the annual energy production, capacity factor, full-load hours and energy by wind speed. 1D Schrödinger solver #923 Choose a textbook potential, type a formula or draw your own, and get the lowest energy levels and wavefunctions of the one-dimensional Schrödinger equation by the matrix (finite-difference) method, with the exact levels alongside for the box, harmonic oscillator, finite well, Morse, linear and Pöschl–Teller potentials. Adduct and neutral loss calculator #984 Type a formula or a neutral monoisotopic mass and get the m/z of 25 common electrospray adducts in positive and negative mode, the ions left after common neutral losses (water, ammonia, CO2, sugars, phosphate and your own), and match a list of observed m/z values within a ppm tolerance. With no molecule, it turns observed m/z values into candidate neutral masses.