Skip to content

    Under active development. New calculators and features ship every week. Everything currently runs free while the site matures — pricing pages are a preview, checkout is not open yet.

    Calculates locally in your browser · Newton-Raphson power flow
    Electrical / power systems

    AC power flow

    The calculation every grid operator runs, and the one that gets harder the closer a network is to its limits. The network is an admittance matrix, the unknowns are the voltage angles and magnitudes, and Newton-Raphson converges quadratically because it rebuilds the Jacobian at every step — which is what a stressed system needs.

    ConvergedYesPV angle-0.14°Voltage margin3.14%
    Load bus voltage
    0.9814
    -1.86% against the slack
    Slack generation
    0.5094
    plus 0.40 at the PV bus
    Real losses
    0.00939
    1.04% of load
    Iterations
    3
    mismatch 8.562e-12
    Bus results and line flows
    Voltages and angles first, then what actually moves between the buses.
    8.562e-12
    Bus results and line flows
    BusTypeV (pu)AngleP (pu)Q (pu)
    1slack1.00000.00°0.50940.1463
    2PV1.0000-0.14°0.40000.1818
    3PQ0.9814-1.47°-0.9000-0.3000

    The slack bus absorbs whatever the rest of the network cannot balance, which is why its injection is an output rather than an input. Its real power equals the total load plus the losses.

    Inspect the model
    Choose a quick result view, a scaled comparison, or the complete diagnostic set.
    Load bus voltage against load
    The nose of the curve is voltage collapse: past it, no solution exists at all.
    Load bus voltage against load0.0000.2210.4420.6630.8841.114040606080809090100100110110120120140140V (pu)
    Line loading
    Real power flow on each line, from the sending end.
    Line loading0.0000.1120.2230.3350.4460.5580.0371–21–20.4372–32–30.4731–31–3pu
    Canonical equations
    The exact relationships implemented by this engine.

    P_i = Σ V_i V_j (G_ij cos θ_ij + B_ij sin θ_ij) · Polar form, per bus.

    J Δx = [ΔP, ΔQ] · Jacobian rebuilt every iteration.

    Y_ij = −1/(R_ij + jX_ij) · Diagonal sums the branches at the bus.

    P_loss = Σ (P_ij + P_ji) · The difference between what enters and leaves.

    engineering methodology

    A clear path from inputs to results.

    The calculation every grid operator runs, and the one that gets harder the closer a network is to its limits. The network is an admittance matrix, the unknowns are the voltage angles and magnitudes, and Newton-Raphson converges quadratically because it rebuilds the Jacobian at every step.

    Step-by-step methodWorked exampleAssumptions explained

    How to use

    1. Set the slack voltage and the generation at the PV bus.
    2. Set the load at the PQ bus.
    3. Enter the line impedances.
    4. Read the bus voltages and angles, the line flows and the losses.

    The formula

    Pi=∑jViVj (Gijcos⁡θij+Bijsin⁡θij)P_i = \sum_j V_i V_j\,(G_{ij}\cos\theta_{ij} + B_{ij}\sin\theta_{ij})

    Reference: Grainger & Stevenson, Power System Analysis; the Newton-Raphson formulation follows the standard polar Jacobian.

    Worked example

    A three-bus network with 0.9 pu of load

    Inputs
    • Slack at 1.0 pu, 0.4 pu of generation at bus 2.
    • 0.9 pu of real and 0.3 pu of reactive load at bus 3.
    • All three lines 2% resistance and 6% reactance.
    Calculation path
    1. 1

      The admittance matrix is built from the three lines.

    2. 2

      Starting from a flat start, the mismatch is computed at every bus except the slack.

    3. 3

      The Jacobian is rebuilt and the state updated; the mismatch falls from order one to 8.6×10⁻¹² in three iterations.

    4. 4

      The load bus settles at 0.9814 pu and −1.47°.

    5. 5

      The slack supplies 0.5094 pu, of which 0.00939 is lost in the lines — about 1% of the load.

    Result

    V₃ 0.9814 pu · 3 iterations · 0.94% losses.

    Interpreting the result

    The voltage at the load bus is the number that matters: below about 0.95 pu equipment starts to misbehave, and below 0.8 the network is near the nose of its PV curve where no solution exists. Push the load slider up and watch the voltage fall and then the solver fail — that failure is voltage collapse, not a numerical problem.

    Assumptions & limitations

    • Three buses: one slack, one PV generator, one PQ load.
    • No shunts, no transformers, no reactive limits.
    • Line charging is neglected.
    • A flat start and a dense linear solve, which is fine at this size.

    Frequently asked questions

    Why does Newton-Raphson converge so fast?

    Because it uses the exact Jacobian at every iteration, so the error squares each time. Three or four iterations is normal; Gauss-Seidel would need dozens and would diverge on a stressed case.

    Why is the slack bus an output?

    Because it absorbs whatever the rest of the network cannot balance. Its real power equals the total load plus the losses, which are only known after the solution.

    What happens when the load is too high?

    The Jacobian becomes singular at the nose of the PV curve. The solver either fails to converge or converges to a low-voltage solution that is not physically reachable.

    What is per unit?

    Every quantity is normalised by a base, so a 100 MVA base makes 1.0 pu equal 100 MW and the arithmetic becomes dimensionless.

    Methodology last reviewed 2026-10-22. Results are informational and not financial or engineering advice — see our disclaimer.