Enter an IPv4 CIDR block below (for example, 192.168.1.0/24) and our subnet calculator instantly returns the netmask, wildcard mask, network address, broadcast address, usable host range, and host counts. It is a fast, free way to work out the details of any IP subnet.
Subnetting is the practice of dividing a larger IP network into smaller, logically separate networks called subnets. Rather than placing every device on one flat network, administrators carve address space into pieces that match the size and purpose of each segment.
A subnet calculator takes the manual math out of this process so you can plan address space quickly and without errors.
CIDR (Classless Inter-Domain Routing) notation describes a network as an address followed by a slash and a prefix length, such as /24. The prefix length is the number of leading bits that identify the network portion of a 32-bit IPv4 address; the remaining bits identify hosts. A shorter prefix like /8 covers a huge block, while a longer prefix like /30 defines a tiny four-address network. Prefixes from /8 to /30 are the ones you will use most often, and this CIDR calculator accepts any valid value in that range.
A subnet mask is the dotted-decimal form of the prefix length. A /24 prefix, for example, sets the first 24 bits to 1, producing the mask 255.255.255.0. The mask tells devices which part of an address is the network and which part is the host.
A wildcard mask is the bitwise inverse of the subnet mask. For /24 that is 0.0.0.255. Wildcard masks are commonly used in access control lists and routing configurations on Cisco-style equipment, where a 0 bit means "must match" and a 1 bit means "ignore."
Every subnet has three key kinds of address:
The number of total addresses in a subnet is 2 raised to the power of the host bits (32 minus the prefix length). A /24 leaves 8 host bits, so it contains 2^8 = 256 total addresses. Because the first address is the network address and the last is the broadcast address, the number of usable hosts is 256 − 2 = 254. This "minus two" rule applies to every ordinary subnet from /8 through /30.
Take the IP subnet 192.168.1.0/26. A /26 prefix leaves 6 host bits, so the block holds 2^6 = 64 total addresses and 62 usable hosts. The calculator returns:
Some address blocks are reserved for private use and are never routed on the public internet. If you are building an internal network, you will usually draw from one of these ranges:
To see the public address your router presents to the internet instead, try our IP address lookup or check What Is My IPv4?.
A subnet calculator converts a CIDR block into its full set of network details, including the subnet mask, wildcard mask, network and broadcast addresses, usable host range, and host counts. It saves you from doing binary math by hand when planning or troubleshooting an IP subnet.
A subnet mask marks the network bits with 1s and host bits with 0s, such as 255.255.255.0 for a /24. A wildcard mask is its exact inverse, 0.0.0.255, and is used mainly in access control lists where a 0 bit means "match this bit" and a 1 bit means "ignore it."
A /24 leaves 8 host bits, giving 2^8 = 256 total addresses. The first address is reserved as the network address and the last as the broadcast address, so 256 − 2 = 254 addresses remain available to assign to devices.
The tool accepts IPv4 prefixes from /8 through /30, covering everything from very large blocks down to small point-to-point links. Just enter an address and prefix, like 192.168.1.0/26, and the results appear instantly.
The reserved private IPv4 ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Addresses in these blocks are used on internal networks and are not routed across the public internet, which is why home and office networks rely on them.