Network

Subnet / CIDR Calculator

IPv4 / CIDR

Subnet Calculator

Enter an IP address with CIDR prefix length to calculate subnet details.

Quick Presets

/8
/16
/24
/25
/26
/27
/28
/29
/30

Enter an IP address with CIDR prefix (e.g. 10.0.0.0/8)

Tool features

Complete IPv4 subnet analysis
4 features

CIDR Calculation

Calculate network, broadcast, and host ranges from CIDR notation

Subnet Math

Network mask, wildcard mask, first & last usable hosts

IP Classification

Identify IP class, private ranges, and address type

Binary View

See network and mask in binary format

What is a subnet & how it works

How a prefix splits an address into network and host

An IPv4 subnet is a block of addresses that share the same network prefix. In CIDR notation, 192.168.1.0/24 means the first 24 bits identify the network and the remaining 8 bits number the hosts, giving 256 addresses.

The first address is the network address and the last is the broadcast address, so a /24 has 254 usable host addresses. This calculator takes an address with a prefix and works out the netmask, wildcard mask, network and broadcast addresses, usable host range and host count.

CIDR prefix
/n: the number of network bits; each step down doubles the addresses.
Netmask
The prefix as dotted decimal, e.g. /24 = 255.255.255.0.
Wildcard mask
The inverted netmask used in Cisco ACLs, e.g. 0.0.0.255.

How to use this tool

Calculate a subnet in four steps
1
Enter an address and prefix
Type an IPv4 address in CIDR form, e.g. 10.0.12.34/22.
2
Calculate
The network is worked out from the address and prefix.
3
Read the results
See the network and broadcast addresses, netmask, wildcard mask and usable range.
4
Plan your network
Use the host count to check the block is big enough before allocating it.

Frequently asked questions

Common questions about subnets
5 Q&A

2(32 − prefix) − 2. A /24 has 254 usable hosts, a /26 has 62 and a /30 has 2. Point-to-point /31 links and single-address /32s are special cases.

They express the same thing. CIDR writes the number of network bits (/24); the netmask writes them as an address (255.255.255.0).

10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918). They are not routed on the public internet.

The first identifies the network itself and the last is the broadcast address that reaches every host in the subnet, so neither is assigned to a device.

No, it handles IPv4 only. IPv6 subnets are normally /64 for a LAN, with no broadcast address.