Subnet Calculator
Network, broadcast, host range and mask for any IPv4 or IPv6 CIDR block.
- Runs in your browser
- Nothing is uploaded
- Free, no sign-up
- Address
- 192.168.1.10
- Network
- 192.168.1.0/24
- Netmask
- 255.255.255.0
- Wildcard mask
- 0.0.0.255
- Broadcast
- 192.168.1.255
- First usable host
- 192.168.1.1
- Last usable host
- 192.168.1.254
- Total addresses
- 256
- Usable hosts
- 254
- Address type
- Private (RFC 1918)
| Network | First host | Last host | Broadcast | Usable |
|---|---|---|---|---|
| 192.168.1.0/25 | 192.168.1.1 | 192.168.1.126 | 192.168.1.127 | 126 |
| 192.168.1.128/25 | 192.168.1.129 | 192.168.1.254 | 192.168.1.255 | 126 |
About this tool
Enter an address with a prefix length or a netmask and get the network and broadcast addresses, the usable host range, the wildcard mask and the number of hosts. Works for IPv4 and IPv6, and can divide a network into equal subnets.
How to use it
- Type an address with a prefix, such as 192.168.1.10/24, or with a netmask, such as 192.168.1.10 255.255.255.0.
- Read the network details, and the binary form of the address and mask.
- Choose a longer prefix under Split into subnets to divide the network.
Reading CIDR notation
The number after the slash is how many of the address's leading bits identify the network. The remaining bits identify hosts within it.
A /24 leaves 8 host bits, so it holds 2⁸ = 256 addresses. The first is the network address and the last is the broadcast address, which leaves 254 usable hosts.
| Prefix | Netmask | Addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /24 | 255.255.255.0 | 256 | 254 |
| /26 | 255.255.255.192 | 64 | 62 |
| /28 | 255.255.255.240 | 16 | 14 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 (point to point) |
| /32 | 255.255.255.255 | 1 | 1 |
Wildcard masks
A wildcard mask is the netmask turned inside out: 0 bits must match, 1 bits can be anything. A /24's wildcard is 0.0.0.255. They appear in router access lists and in OSPF network statements, which is why the calculator prints one next to the netmask.
Private and special addresses
The address type tells you at a glance whether an address is reachable from the internet.
- 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are private ranges (RFC 1918) for use inside a network.
- 100.64.0.0/10 is shared address space used by carriers for carrier-grade NAT. If your router's "internet" address starts with 100.64, you are behind one.
- 169.254.0.0/16 is link-local: what a machine assigns itself when it finds no DHCP server.
- 127.0.0.0/8 is loopback, and 224.0.0.0/4 is multicast.
IPv6 works differently
IPv6 has no broadcast address and does not subtract two from the host count. The standard subnet is a /64, which holds 2⁶⁴ addresses; it is not subdivided to save space, as IPv4 subnets are.
Addresses are written in hexadecimal with :: standing for one run of zero groups. The calculator shows both the compressed form (following RFC 5952) and the fully expanded one, since the long form is what you want when comparing or sorting addresses. For converting between number systems, see the number base converter.
Frequently asked questions
Why does a /31 or /32 look different?
A /32 is a single host, so it has one address and no network or broadcast. A /31 has two addresses and, under RFC 3021, both are usable on a point-to-point link.
Why are two addresses subtracted from the host count?
In an ordinary IPv4 subnet the first address names the network and the last is the broadcast address. Neither can be assigned to a host.
Can I use a netmask instead of a prefix length?
Yes. Write 192.168.1.10 255.255.255.0 or 192.168.1.10/255.255.255.0. A mask whose 1 bits are not contiguous is rejected as invalid.
How many subnets can I split into?
From 2 up to 256 at a time. The table lists the first 256 when there are more, and tells you how many there are in total.
Related tools
Number Base Converter
Convert integers between binary, octal, decimal, hex and any base to 36.
Chmod Calculator
Work out Unix permissions as octal, symbolic and plain English.
URL Encoder & Decoder
Percent-encode and decode URLs, full strings or single components.
UUID Generator
Generate random v4 or time-ordered v7 UUIDs in bulk.