Skip to content
Calcrivo

Docker Bridge Network Calculator

Calculate how many containers a Docker bridge network's subnet can support.

Inputs

/bits

CIDR prefix length (e.g. 24 for /24 = 254 usable IPs).

IPs

IPs reserved (network, broadcast, gateway = minimum 3).

containers

Number of containers you plan to run on this bridge.

Usable Container IPs

253

IP Headroom

203IPs

Subnet Utilization

19.8%

Total IPs in Subnet

256

Step by step

  1. Total IPs in subnet

    2^(32 − 24)

    = 256

  2. Usable IPs

    256 − 3

    = 253

  3. Utilization

    50 / 253

    = 19.8%

How it works

A Docker bridge network assigns one IP per container from its subnet. Usable IPs = 2^(32−CIDR) − reserved. A /24 gives 254 usable addresses (256 − network − broadcast); a /16 gives ~65,533.

Formula

Usable IPs

usableIPs = 2^(32 − CIDR) − reserved

CIDR
Subnet prefix length
reserved
Reserved addresses (network, broadcast, gateway)

Frequently Asked Questions

What happens when the subnet runs out of IPs?

Docker will fail to start new containers with an error like 'no available IPs in pool'. You'd need to create additional bridge networks with different subnets.

Can I use multiple bridge networks?

Yes — each user-defined bridge network has its own subnet. Containers can be attached to multiple networks for cross-network communication.

You might also need