Subnet calculator
Enter an IP address with a prefix length or a subnet mask and get the network address, broadcast address, first and last usable host, host count, wildcard mask and the binary view — for IPv4 and IPv6. Everything is calculated in your browser.
192.168.1.0/24
- Network address
- 192.168.1.0
- Broadcast address
- 192.168.1.255
- First usable host
- 192.168.1.1
- Last usable host
- 192.168.1.254
- Usable hosts
- 254
- Total addresses
- 256
- Subnet mask
- 255.255.255.0
- Wildcard mask
- 0.0.0.255
- Prefix length
- /24network bits: 24 · host bits: 8
- Class
- C
- Address type
- Private-use network · RFC 1918
- Reverse DNS zone
- 1.168.192.in-addr.arpa
- PTR record name
- 0.1.168.192.in-addr.arpa
Bit diagram
Split into subnets
Equal-size subnets of the network above. For mixed sizes (VLSM), split the largest piece again.
| Subnet | Host range | Usable hosts |
|---|---|---|
| 192.168.1.0/26 | 192.168.1.1 – 192.168.1.62 | 62 |
| 192.168.1.64/26 | 192.168.1.65 – 192.168.1.126 | 62 |
| 192.168.1.128/26 | 192.168.1.129 – 192.168.1.190 | 62 |
| 192.168.1.192/26 | 192.168.1.193 – 192.168.1.254 | 62 |
Supernet / aggregate
Paste several prefixes, one per line: the smallest single prefix that covers them all, and the minimal list that matches exactly.
Nothing to aggregate yet.
IPv4 subnet calculator
Type an address and mask in any common form: 192.168.1.10/24, 192.168.1.10 255.255.255.0, or the address and a host count you need. The result updates as you type.
Network and broadcast address
The network address is the first address of the block, with all host bits set to 0 (192.168.1.0 for /24); the broadcast address is the last, with all host bits set to 1 (192.168.1.255). Neither can be assigned to a device on a normal LAN.
Usable hosts
Everything between network and broadcast: 2^(32 − prefix) − 2 addresses, so a /24 has 254 usable hosts, a /30 has 2 and a /31 (point-to-point links, RFC 3021) uses both addresses. A /32 is a single host.
Subnet mask and wildcard
The mask has the prefix-length leading bits set (/24 = 255.255.255.0); the wildcard mask is its inverse (0.0.0.255) and is what access lists on Cisco equipment expect. Both are shown in dotted-decimal and binary.
Split a network (VLSM)
Enter the block you have and the sizes you need, and the calculator divides it into the smallest subnets that fit, largest first, with each subnet's range. This is variable-length subnet masking, the normal way to carve an office or data center block.
IPv6 subnet calculator
Enter an IPv6 address with a prefix, for example 2001:db8:abcd::/48, to get the first and last address of the block, the compressed and expanded forms, the number of /64 networks it contains and the reverse DNS zone name. IPv6 has no broadcast address and host counts are astronomical, so the useful question is almost always how many /64s do I get — a /48 gives 65,536 of them, a /56 gives 256, the typical home allocation.
Subnet cheat sheet
| Prefix | Mask | Usable hosts |
|---|---|---|
| /30 | 255.255.255.252 | 2 |
| /29 | 255.255.255.248 | 6 |
| /28 | 255.255.255.240 | 14 |
| /27 | 255.255.255.224 | 30 |
| /26 | 255.255.255.192 | 62 |
| /25 | 255.255.255.128 | 126 |
| /24 | 255.255.255.0 | 254 |
| /23 | 255.255.254.0 | 510 |
| /22 | 255.255.252.0 | 1,022 |
| /21 | 255.255.248.0 | 2,046 |
| /20 | 255.255.240.0 | 4,094 |
| /16 | 255.255.0.0 | 65,534 |
| /8 | 255.0.0.0 | 16,777,214 |
IPv6: a /64 is one LAN; a /56 holds 256 of them; a /48 holds 65,536; a /32 is a typical ISP allocation.
/24, /16, /8 explained
The number after the slash is how many leading bits identify the network; the rest identify hosts within it. /24 leaves 8 host bits (256 addresses), /16 leaves 16 (65,536), /8 leaves 24 (16.7 million). These three align with the old class C, B and A boundaries, which is why they are still the most quoted; any prefix length from /0 to /32 is valid. See CIDR notation explained.
How subnetting works
An IPv4 address is 32 bits. The subnet mask says how many of those bits, from the left, name the network; a device compares the destination address with its own under the mask to decide whether to send directly (same network) or to the router (different network). Subnetting takes a block and makes the network part longer, creating several smaller networks — one per office floor, per VLAN, per customer. The guides what is a subnet mask and IP address classes cover the background; the CIDR to IP range converter does the reverse of this calculator.
Frequently asked questions
What does a subnet mask of 255.255.255.0 mean?
The first 24 bits of the address identify the network and the last 8 identify the host, so the network holds 256 addresses, 254 of them usable. It is written /24 in CIDR notation and is the most common size for a home or office LAN.
What does the CIDR mask 192.168.1.0/24 mean?
The network 192.168.1.0 with a 24-bit mask (255.255.255.0): addresses 192.168.1.0 to 192.168.1.255, of which 192.168.1.1–192.168.1.254 can be assigned to devices and .255 is the broadcast address.
What is a subnet mask in simple words?
A pattern that says which part of an IP address names the network and which part names the device: the 1-bits cover the network part. Devices with the same network part can talk directly; everything else goes through the router.
What is the difference between a subnet mask and an IP address?
The IP address identifies one device; the subnet mask says how much of that address is shared by all devices on the same network. 192.168.1.10 with mask 255.255.255.0 means device 10 on network 192.168.1.
What is 24 in CIDR notation?
/24 means the first 24 bits of the address are the network prefix, equivalent to the mask 255.255.255.0: a block of 256 addresses.
What does a /32 CIDR mean?
A /32 is a single address — all 32 bits are the prefix, so there are no host bits. It is used for host routes, loopback addresses and firewall rules that match exactly one address.
Calculated in your browser: nothing is sent to a server. Address types follow the IANA special-purpose registries (RFC 6890 and successors); the maths is verified against Python's ipaddress module.