IP & Network Tools

NETOPSIYON IP

IP Subnet Calculator

Calculate a network block, gateway choice and device address pool from an IP address and a CIDR prefix or subnet mask.

IPv4 supports /0–/32 and IPv6 supports /0–/128. A prefix entered with the IP address takes precedence. IPv4 also accepts dotted masks such as 255.255.255.248.

Example: if your provider assigned 203.0.113.10 and /29, .

An IP address and CIDR prefix cannot determine the gateway. Enter the gateway your provider supplied; choosing the first or last host is only a suggestion. IPv6 gateways are not selected automatically.

How to interpret the results

CIDR, subnet masks and remaining addresses

/29 corresponds to 255.255.255.248; /30 corresponds to 255.255.255.252. A /30 has four addresses: two hosts remain after network and broadcast addresses are excluded, and one device address remains if a host is reserved for the gateway. /32 represents one address; the gateway cannot be inferred from its prefix.

IPv4 CIDR ↔ subnet mask table (/0–/32)
CIDRSubnet maskTotal addressesHost addressesDevices after reserving 1 gateway
/00.0.0.0429496729642949672944294967293
/1128.0.0.0214748364821474836462147483645
/2192.0.0.0107374182410737418221073741821
/3224.0.0.0536870912536870910536870909
/4240.0.0.0268435456268435454268435453
/5248.0.0.0134217728134217726134217725
/6252.0.0.0671088646710886267108861
/7254.0.0.0335544323355443033554429
/8255.0.0.0167772161677721416777213
/9255.128.0.0838860883886068388605
/10255.192.0.0419430441943024194301
/11255.224.0.0209715220971502097149
/12255.240.0.0104857610485741048573
/13255.248.0.0524288524286524285
/14255.252.0.0262144262142262141
/15255.254.0.0131072131070131069
/16255.255.0.0655366553465533
/17255.255.128.0327683276632765
/18255.255.192.0163841638216381
/19255.255.224.0819281908189
/20255.255.240.0409640944093
/21255.255.248.0204820462045
/22255.255.252.0102410221021
/23255.255.254.0512510509
/24255.255.255.0256254253
/25255.255.255.128128126125
/26255.255.255.192646261
/27255.255.255.224323029
/28255.255.255.240161413
/29255.255.255.248865
/30255.255.255.252421
/31255.255.255.25422Depends on the P2P plan
/32255.255.255.25511Single address; routing comes from the provider

This table uses the conventional IPv4 subnet model. A /31 point-to-point link can use both addresses. Any additional addresses reserved by the provider are not included.

Gateway and device addresses in a /29

For 203.0.113.10/29, the network is 203.0.113.8, broadcast is 203.0.113.15, and hosts run from .9 to .14. Reserving .9 for the gateway leaves five device addresses, .10–.14. If your provider supplied a different gateway, enter that address instead.

A gateway in the middle of the block splits the device pool into two ranges. An off-block gateway does not consume an address from the block; the result explains any routed-block or special-route considerations. Blocks of up to 256 addresses list every address and its role.

The number after the slash in CIDR notation is the network prefix length. For example, 192.168.1.10/24 belongs to 192.168.1.0–192.168.1.255. A conventional IPv4 /24 leaves 254 host addresses after excluding the network and broadcast addresses.

A /31 point-to-point link can use both addresses; /32 represents one address. IPv6 has no broadcast. The calculation describes the numeric range, without assessing special assignment rules. No external data service is used for this calculation.

Read the related technical guides →