Subnet Calculator
An IPv4 or IPv6 subnet worked out in the browser: its network and host range, broadcast address, masks and reverse DNS zones, the kind of address block IANA says it is, and whether another address is inside it.
Overview
A prefix length splits an address into a network part and a host part. In 192.168.1.10/24 the
first 24 bits name the network and the last 8 the host, so every address from 192.168.1.0 to
192.168.1.255 is on the same network and reaches the others directly. The calculator does that
split for any address and prefix, IPv4 or IPv6, and names everything that follows from it.
Web interface
Type an address with its prefix or its netmask. The result appears as you type; a complaint about the input
waits until you stop typing, because 192.168.1. is not wrong yet. The buttons under the field fill
in an example.
- The subnet in CIDR notation stands at the top, with Copy beside it, followed by a sentence placing the address you typed within it.
- A click on any value selects all of it, ready to copy.
- Address type names the IANA block the subnet lies in and links to the IP Address Lookup for the address.
- Is an address in this subnet? takes a second address and says whether it is inside, and if not, which network it belongs to at the same prefix. It also warns when the address is the network or broadcast address, which no host can use.
- In binary, for IPv4, shows the address, netmask and network bit by bit, the network bits in colour.
The address bar follows the input, so a result can be bookmarked or shared as a link.
URL parameters
| Pattern | Example |
|---|---|
| /calculate/subnet/{address}/{prefix} | /calculate/subnet/192.168.1.10/24 |
| /calculate/subnet/{address}/{netmask} | /calculate/subnet/10.20.30.40/255.255.240.0 |
| /calculate/subnet/{ipv6}/{prefix} | /calculate/subnet/2001:db8::1/64 |
| /calculate/subnet/{address} | /calculate/subnet/192.168.1.10, a single address |
A netmask in the link is turned into its prefix once the page has read it, so the address bar then shows
/calculate/subnet/10.20.30.40/20. An IPv6 address goes into the path as it is, without brackets.
Reading the result
| Row | What it is |
|---|---|
| Netmask | the prefix written as an address: /24 is 255.255.255.0 |
| Wildcard mask | the netmask inverted, 0.0.0.255 for a /24, the form Cisco access lists and OSPF take |
| Network address | the first address, with every host bit zero; it names the subnet |
| Broadcast address | the last address, with every host bit one; a packet to it reaches every host on the subnet |
| Usable range, Usable hosts | the addresses between those two, the ones a host can be given |
| Total addresses | every address in the subnet, 2 to the power of the host bits |
| Reverse DNS zone | where the PTR records for the subnet live, under in-addr.arpa or ip6.arpa |
| Prefix length, First address, Last address | IPv6: the bounds of the subnet; IPv6 has no broadcast address |
| Addresses | IPv6: counted exactly, all 39 digits of a /0 included, with the power of two beside it |
| /64 networks | IPv6: how many standard-sized networks the prefix holds |
| Expanded | IPv6: the address with every group written out to four digits |
Two IPv4 prefixes have no network or broadcast address to give up. A /31 is a point-to-point link, and
RFC 3021 lets both of its addresses be
used; a /32 is a single address. IPv6 addresses are shown as
RFC 5952 writes them: lower case, no leading
zeros, and the longest run of zero groups shortened to ::. The first address of an IPv6 subnet is
its Subnet-Router anycast address (RFC 4291).
A reverse zone ends on a whole octet for IPv4 and on a whole hex digit for IPv6, so a prefix in between covers
several zones: 172.16.0.0/12 spans the 16 zones from 16.172.in-addr.arpa to
31.172.in-addr.arpa. An IPv4 subnet smaller than a /24 lies inside one /24 zone, and is delegated
below it as RFC 2317 describes.
Address types
The address type is the most specific block in the IANA special-purpose address registries that contains the
whole subnet, with the first RFC IANA cites for it and two of the registry's columns: Globally
reachable, whether packets to the block may travel beyond the network that uses it, and
Forwardable, whether a router may forward them at all. A subnet that takes in several blocks,
such as 192.0.0.0/16, lists the first four.
Outside every block, an IPv4 subnet is public address space, or multicast within 224.0.0.0/4
(RFC 5771). An IPv6 subnet is global unicast within 2000::/3, multicast within
ff00::/8, and otherwise reserved by the IETF (RFC 4291). The tables are the registries as published
on 13 September 2026.
IPv4
| Block | Name | RFC | Globally reachable | Forwardable |
|---|---|---|---|---|
| 0.0.0.0/8 | This network | RFC 791 | no | no |
| 0.0.0.0/32 | This host on this network | RFC 1122 | no | no |
| 10.0.0.0/8 | Private-Use | RFC 1918 | no | yes |
| 100.64.0.0/10 | Shared Address Space | RFC 6598 | no | yes |
| 127.0.0.0/8 | Loopback | RFC 1122 | no | no |
| 169.254.0.0/16 | Link Local | RFC 3927 | no | no |
| 172.16.0.0/12 | Private-Use | RFC 1918 | no | yes |
| 192.0.0.0/24 | IETF Protocol Assignments | RFC 6890 | no | no |
| 192.0.0.0/29 | IPv4 Service Continuity Prefix | RFC 7335 | no | yes |
| 192.0.0.8/32 | IPv4 dummy address | RFC 7600 | no | no |
| 192.0.0.9/32 | Port Control Protocol Anycast | RFC 7723 | yes | yes |
| 192.0.0.10/32 | Traversal Using Relays around NAT Anycast | RFC 8155 | yes | yes |
| 192.0.0.170/32 | NAT64/DNS64 Discovery | RFC 8880 | no | no |
| 192.0.0.171/32 | NAT64/DNS64 Discovery | RFC 8880 | no | no |
| 192.0.2.0/24 | Documentation (TEST-NET-1) | RFC 5737 | no | no |
| 192.31.196.0/24 | AS112-v4 | RFC 7535 | yes | yes |
| 192.52.193.0/24 | AMT | RFC 7450 | yes | yes |
| 192.88.99.0/24 | Deprecated (6to4 Relay Anycast) | RFC 7526 | not stated | not stated |
| 192.88.99.2/32 | 6a44-relay anycast address | RFC 6751 | no | yes |
| 192.168.0.0/16 | Private-Use | RFC 1918 | no | yes |
| 192.175.48.0/24 | Direct Delegation AS112 Service | RFC 7534 | yes | yes |
| 198.18.0.0/15 | Benchmarking | RFC 2544 | no | yes |
| 198.51.100.0/24 | Documentation (TEST-NET-2) | RFC 5737 | no | no |
| 203.0.113.0/24 | Documentation (TEST-NET-3) | RFC 5737 | no | no |
| 240.0.0.0/4 | Reserved | RFC 1112 | no | no |
| 255.255.255.255/32 | Limited Broadcast | RFC 8190 | no | no |
IPv6
| Block | Name | RFC | Globally reachable | Forwardable |
|---|---|---|---|---|
| ::1/128 | Loopback Address | RFC 4291 | no | no |
| ::/128 | Unspecified Address | RFC 4291 | no | no |
| ::ffff:0:0/96 | IPv4-mapped Address | RFC 4291 | no | no |
| 64:ff9b::/96 | IPv4-IPv6 Translation | RFC 6052 | yes | yes |
| 64:ff9b:1::/48 | IPv4-IPv6 Translation | RFC 8215 | no | yes |
| 100::/64 | Discard-Only Address Block | RFC 6666 | no | yes |
| 100:0:0:1::/64 | Dummy IPv6 Prefix | RFC 9780 | no | no |
| 2001::/23 | IETF Protocol Assignments | RFC 2928 | no | no |
| 2001::/32 | TEREDO | RFC 4380 | not stated | yes |
| 2001:1::1/128 | Port Control Protocol Anycast | RFC 7723 | yes | yes |
| 2001:1::2/128 | Traversal Using Relays around NAT Anycast | RFC 8155 | yes | yes |
| 2001:1::3/128 | DNS-SD Service Registration Protocol Anycast | RFC 9665 | yes | yes |
| 2001:2::/48 | Benchmarking | RFC 5180 | no | yes |
| 2001:3::/32 | AMT | RFC 7450 | yes | yes |
| 2001:4:112::/48 | AS112-v6 | RFC 7535 | yes | yes |
| 2001:10::/28 | Deprecated (previously ORCHID) | RFC 4843 | not stated | not stated |
| 2001:20::/28 | ORCHIDv2 | RFC 7343 | yes | yes |
| 2001:30::/28 | Drone Remote ID Protocol Entity Tags (DETs) Prefix | RFC 9374 | yes | yes |
| 2001:db8::/32 | Documentation | RFC 3849 | no | no |
| 2002::/16 | 6to4 | RFC 3056 | not stated | yes |
| 2620:4f:8000::/48 | Direct Delegation AS112 Service | RFC 7534 | yes | yes |
| 3fff::/20 | Documentation | RFC 9637 | no | no |
| 5f00::/16 | Segment Routing (SRv6) SIDs | RFC 9602 | no | yes |
| fc00::/7 | Unique-Local | RFC 4193 | no | yes |
| fe80::/10 | Link-Local Unicast | RFC 4291 | no | no |
IPv4 prefixes
| Prefix | Netmask | Wildcard | 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 |
Input rules
- A prefix follows a slash,
192.168.1.10/24. A netmask follows a slash or a space,192.168.1.10 255.255.255.0. - An address on its own is a single host, a /32 or a /128.
- IPv6 may carry an IPv4 address in its last 32 bits,
::ffff:192.0.2.1, and may be written in brackets,[2001:db8::1]/64, the way a URL writes it. - Upper and lower case are the same.
Some input is refused, each time with the reason:
| Message | When |
|---|---|
"010" has a leading zero, which some systems read as an octal number. Leave the zero out. | a number with a leading zero; inet_aton reads 010 as 8, so the text would name two addresses |
0.0.0.255 is a wildcard mask, a netmask turned inside out. The netmask is 255.255.255.0, which is /24. | a wildcard mask where a netmask belongs |
255.0.255.0 is not a netmask. Its ones have to come first, in one unbroken run. | a mask that is neither |
Each number in an IPv4 address runs from 0 to 255, and 300 is past that. | a number above 255 |
An IPv4 prefix runs from /0 to /32. | a longer prefix; for IPv6 the limit is /128 |
The zone after the % sign, such as %eth0, is not part of the address. Leave it out. | an IPv6 zone index, fe80::1%eth0 |
"::" may appear only once in an IPv6 address. | two shortened runs, which would make the address ambiguous |
No API
There is no API for this tool. A subnet is a handful of bit operations, run in the browser, and the table under Reading the result describes each of them well enough to redo anywhere else.
Privacy
Nothing leaves the browser. The addresses are worked out on the page and are not stored or sent. The address bar changes as you type, which puts the subnet into the browser's history like any other page. The link to the IP Address Lookup opens that tool, which does send the address to the server, and only once you follow it.