Subnet Calculator
IPv4 CIDR maths: network, broadcast, mask, host range and count.
Frequently asked questions
What does the subnet calculator compute?
From a CIDR like 192.168.1.0/24 it returns the network and broadcast addresses, netmask and wildcard mask, the usable host range and the total and usable host counts.
What is CIDR notation?
CIDR writes a network as an address plus a prefix length, such as /24, indicating how many leading bits are the network portion. /24 equals a 255.255.255.0 mask.
Why are two addresses not usable?
In most IPv4 subnets the network address and the broadcast address are reserved, so the usable host count is two fewer than the total (except /31 and /32).
How many hosts are in a /24 or a /16?
A /24 has 256 addresses with 254 usable for hosts, and a /16 has 65,536 addresses with 65,534 usable. In each case two addresses are reserved for the network and broadcast.
What is the difference between a /31 and a /30?
A /30 provides two usable host addresses and is common for point-to-point links, while a /31 provides two addresses used as a pair for point-to-point links without a separate network and broadcast, per RFC 3021.
What is a wildcard mask?
A wildcard mask is the bitwise inverse of a subnet mask, used by tools like access control lists. Where the netmask has ones, the wildcard has zeros, so it specifies which address bits to ignore when matching.
How do I split a network into smaller subnets?
Borrow bits from the host portion by increasing the prefix length. Each extra bit doubles the number of subnets and halves the hosts per subnet, so a /24 splits into two /25s or four /26s.
What are private IP address ranges?
The private IPv4 ranges reserved for internal networks are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Addresses in these ranges are not routable on the public internet.