CalcWorldHub
Free online calculator · no signup

Network maximum flow and minimum cut calculator

Maximize feasible source-to-sink flow subject to directed edge capacities and intermediate flow conservation.

4,000 tools
Network maximum flow and minimum cut calculator — Node count, Directed edges as from to nonnegative capacity, Source node and calculation method
Network maximum flow and minimum cut calculator: inputs and calculation method.

How to use this calculator

Maximize feasible source-to-sink flow subject to directed edge capacities and intermediate flow conservation.

  1. Enter Node count, Directed edges as from to nonnegative capacity, Source node, Sink node. Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

Network maximum flow and minimum cut explained

A four-node directed network illustrates both the maximum feasible flow and its matching minimum cut.

Maximum source-to-sink flow5capacity units
Maximum source-to-sink flow: 5 capacity units in the worked scenario.

A numerical walkthrough

Node count = 4; Directed edges as from to nonnegative capacity = 1 2 3, 1 3 2, 2 3 1, 2 4 2, 3 4 3; Source node = 1; Sink node = 4.

  • Maximum source-to-sink flow: 5 capacity units
  • Minimum cut capacity: 5 capacity units
  • Source-side cut nodes: 1

The source has 5 capacity units leaving it and the sink has 5 entering it. The matching 5-unit flow and cut certify that no larger source-to-sink flow is possible for this example.

The model behind the numbers

Edmonds–Karp residual augmenting paths

Maintain residual capacities, including reverse capacity that can undo earlier flow. Repeated breadth-first augmenting paths increase the source-to-sink total until none remains. Nodes still reachable in the residual graph identify a minimum cut.

What to enter

n — Node count
Number n of nodes labeled 1 through n; source and sink must be different labels in this range.
e — Directed edges as from to nonnegative capacity
List each directed edge as from-node, to-node, capacity. Capacities are nonnegative; parallel edges are added.
s — Source node
Label of the node that supplies flow; it must be in 1…n and differ from the sink.
t — Sink node
Label of the destination node; it must be in 1…n and differ from the source.

Interpreting the result

Single commodity, nonnegative capacities, no lower bounds or flow costs; parallel edge capacities are added.

Frequently asked questions

Does reverse residual flow mean a reverse physical edge?

No, it can cancel previously assigned flow.

What does the cut show?

A partition whose forward capacity equals the maximum flow.

Are node capacities supported?

Not directly; transform them into edge capacities first.

How do I use the Network maximum flow and minimum cut calculator?

Enter Node count, Directed edges as from to nonnegative capacity, Source node, Sink node. Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Network maximum flow and minimum cut?

Node count = 4; Directed edges as from to nonnegative capacity = 1 2 3, 1 3 2, 2 3 1, 2 4 2, 3 4 3; Source node = 1; Sink node = 4. Maximum source-to-sink flow: 5 capacity units Minimum cut capacity: 5 capacity units Source-side cut nodes: 1 The source has 5 capacity units leaving it and the sink has 5 entering it. The matching 5-unit flow and cut certify that no larger source-to-sink flow is possible for this example.