Subnet Calculator
Calculate network, broadcast, host range and mask for any IPv4 or IPv6 CIDR, and split, merge or convert ranges.
192.168.1.0/24
Private-Use (RFC 1918), not globally reachable
- Broadcast
- 192.168.1.255
- First usable
- 192.168.1.1
- Last usable
- 192.168.1.254
- Usable hosts
- 254
- Total addresses
- 256
- Subnet mask
- 255.255.255.0
- Wildcard mask
- 0.0.0.255
- Binary
- 11000000.10101000.00000001.00000000
- Reverse DNS zone
- 1.168.192.in-addr.arpa
- Legacy class
- Class C
4 subnets of /26, 62 usable hosts each.
| # | Network | Host range | Hosts |
|---|---|---|---|
| 1 | 192.168.1.0/26 | 192.168.1.1 – 192.168.1.62 | 62 |
| 2 | 192.168.1.64/26 | 192.168.1.65 – 192.168.1.126 | 62 |
| 3 | 192.168.1.128/26 | 192.168.1.129 – 192.168.1.190 | 62 |
| 4 | 192.168.1.192/26 | 192.168.1.193 – 192.168.1.254 | 62 |
Type an address with its prefix, such as 192.168.1.77/24, an address and a subnet mask, or an IPv6 network such as 2001:db8::/48, and the tool gives the network, its first and last host, the broadcast address, the masks and how many hosts it holds, with what the range is for according to the IANA registries.
Below the result, the network can be split into equal subnets or into subnets sized for the hosts each needs (VLSM), and separate tools merge a list of blocks, turn a start and end address into CIDR blocks, and check whether an address falls inside the network. Everything is worked out in your browser.
Reading the result
- Network — the first address, with every host bit zero, and the prefix. An address typed with host bits set, such as
10.1.2.3/8, is kept on its own row and its network worked out. - Broadcast — the last address, with every host bit one. IPv6 has none.
- First and last usable — the addresses hosts can take: all but the network and broadcast address, so a /24 has 256 addresses and 254 usable hosts.
- Subnet mask and wildcard mask — the prefix as a dotted mask, and its inverse, which Cisco ACLs and OSPF take.
- Reverse DNS zone — the
in-addr.arpaorip6.arpazone that holds the network's PTR records. A single address shows its own PTR name. - Address type — the line under the network: the IANA special-purpose entry the whole network falls in, and whether the registry marks it globally reachable. A network that spans several entries lists the ones it contains.
A mask after the address is read as a subnet mask when it is one, and otherwise as a wildcard mask. 0.0.0.0 and 255.255.255.255 are both, and are read as subnet masks (/0 and /32), with a note. An address without a prefix is a single address, /32 or /128.
How it works
An address is a 32-bit (IPv4) or 128-bit (IPv6) number. The prefix length is how many leading bits name the network; the rest number the hosts inside it. All arithmetic is done on whole numbers of that size, so an IPv6 /0 is counted exactly.
A /31 holds only two addresses. RFC 3021 lets both be hosts on a point-to-point link, so the tool shows two usable hosts and no broadcast; a /32 is one host. IPv6 /127 links follow RFC 6164.
IPv6 addresses are written in the RFC 5952 form: lowercase, leading zeros dropped, and the longest run of two or more zero groups shortened to :: (the first, when two runs tie). The expanded row writes all eight groups.
VLSM sizes each subnet for its host count, the largest first, and packs them from the start of the network, so every subnet starts on a boundary of its own size. An IPv4 subnet keeps its network and broadcast addresses, so 1 or 2 hosts take a /30 and 3 a /29. /31 for 2-host links, off by default, gives a need of 1 or 2 hosts a /31 instead, as RFC 3021 allows on point-to-point links. VLSM never gives a /32.
network = address AND mask
broadcast = network OR wildcard
total addresses = 2^(32 − prefix)
usable hosts = total − 2 (a /31 has 2, a /32 has 1)
Examples
A home network, 192.168.1.77/24
- Address
- 192.168.1.77
- Network
- 192.168.1.0/24
- Broadcast
- 192.168.1.255
- First usable
- 192.168.1.1
- Last usable
- 192.168.1.254
- Usable hosts
- 254
- Total addresses
- 256
- Subnet mask
- 255.255.255.0
- Wildcard mask
- 0.0.0.255
- Reverse DNS zone
- 1.168.192.in-addr.arpa
- Legacy class
- Class C
The address keeps its own row because its host bits are not zero; the network is the same for any address from 192.168.1.0 to 192.168.1.255.
10.0.0.0/24 for 60, 30 and 10 hosts
- IP address or CIDR
- 10.0.0.0/24
- Split, by Hosts
- Sales 60, Office 30, Lab 10
- Sales
- 10.0.0.0/26, 10.0.0.1 – 10.0.0.62, 62 hosts
- Office
- 10.0.0.64/27, 10.0.0.65 – 10.0.0.94, 30 hosts
- Lab
- 10.0.0.96/28, 10.0.0.97 – 10.0.0.110, 14 hosts
- Free
- 10.0.0.112/28, 10.0.0.128/25
Each subnet is the smallest that holds its hosts: 60 hosts take a /26 (62 usable), 30 hosts take a /27 (30 usable), 10 hosts take a /28 (14 usable). Placed largest first, they fill the start of the network, and the rest stays free as 2 blocks.
2001:db8::/48 into /64 networks
- IP address or CIDR
- 2001:db8::/48
- Split, by Prefix: New prefix
- /64
- Subnets
- 65,536
- First three
- 2001:db8::/64, 2001:db8:0:1::/64, 2001:db8:0:2::/64
- Address type
- Documentation (RFC 3849), not globally reachable
A /48, a common allocation for one site, holds 65,536 LANs of /64. The table lists the first 1,024; 2001:db8::/32 is reserved for documentation, so examples like this one never reach a real network.
IPv4 prefix cheat sheet
| Prefix | Subnet mask | Wildcard mask | Addresses | Usable hosts |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
Address types and the standards
Address types come from the IANA IPv4 and IPv6 Special-Purpose Address Registries as last updated on 9 October 2025, with each entry's Globally Reachable flag, the blocks of the IPv4 Multicast Address Space and the top-level IPv6 allocations. IPv6 multicast addresses also show their scope (RFC 7346). A special-purpose block is not always private: the AS112 and anycast blocks are globally reachable. Any IPv4 address outside every entry is public.
The private ranges of RFC 1918 are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16; 100.64.0.0/10 is shared address space for carrier-grade NAT (RFC 6598), and fc00::/7 holds IPv6 unique local addresses.
Sources
- IANA IPv4 Special-Purpose Address Registry — IANA
- IANA IPv6 Special-Purpose Address Registry — IANA
- IPv4 Multicast Address Space Registry — IANA
- Internet Protocol Version 6 Address Space — IANA
- RFC 4632: Classless Inter-domain Routing (CIDR) — IETF
- RFC 1918: Address Allocation for Private Internets — IETF
- RFC 2317: Classless IN-ADDR.ARPA delegation — IETF
- RFC 3021: Using 31-Bit Prefixes on IPv4 Point-to-Point Links — IETF
- RFC 4291: IP Version 6 Addressing Architecture — IETF
- RFC 5952: A Recommendation for IPv6 Address Text Representation — IETF
- RFC 6164: Using 127-Bit IPv6 Prefixes on Inter-Router Links — IETF
- RFC 6598: IANA-Reserved IPv4 Prefix for Shared Address Space — IETF
- RFC 7346: IPv6 Multicast Address Scopes — IETF
- RFC 9637: Expanding the IPv6 Documentation Space — IETF
Reviewed
Frequently asked questions
See also
- Number Base Converter — to convert an address or mask between binary, decimal and hex.