Subnet Calculator
Free subnet calculator for IPv4 and IPv6. It shows the network, broadcast, host range and masks, and splits, plans and merges CIDR blocks.
Updated
IPv4 or IPv6, with a prefix, a subnet mask or a wildcard mask.
A name and a host count, or a bare number.
Two addresses, separated by a hyphen, the word to, or a space.
One per line, or separated by commas or spaces.
- Usable host range
- 192.168.1.1 to 192.168.1.254
- Broadcast address
- 192.168.1.255
- Total addresses
- 256
- Address type
- Not globalPrivate-Use, 192.168.0.0/16
255.255.255.0
0.0.0.255
192.168.1.0-192.168.1.255
192.168.1.0 0.0.0.255
Network details (8)
- Address
- 192.168.1.10
- Network address
- 192.168.1.0
- Usable hosts
- 254
- Prefix length
- /24
- Cloud usable addresses
- AWS 251, Azure 251, Google Cloud 252
- Class (historical)
- C
- Registry entry
- Private-Use (RFC 1918), 192.168.0.0/16
- Globally reachable
- No
Binary, hex and reverse DNS (7)
- Address in binary
- 11000000.10101000.00000001|00001010
- Mask in binary
- 11111111.11111111.11111111|00000000
- Hex
- 0xc0a8010a
- Integer
- 3232235786
- Reverse DNS name
- 10.1.168.192.in-addr.arpa
- Reverse DNS zone
- 1.168.192.in-addr.arpa
- IPv4-mapped IPv6
- ::ffff:192.168.1.10
Note
- 192.168.1.10 is a host address in 192.168.1.0/24.
What Is a Subnet Calculator?
The subnet calculator works out the network address, broadcast address, usable host range, subnet mask, wildcard mask and host count of an IPv4 or IPv6 block. Enter an address with a prefix length, a subnet mask or a wildcard mask. Other modes split a block into equal subnets, plan VLSM subnets from host counts, convert an address range to CIDR blocks, and merge a list of blocks. Each address is classified with the IANA special-purpose address registries.
How to Use the Subnet Calculator
- Enter an address with a prefix length (192.168.1.10/24), a subnet mask (192.168.1.10 255.255.255.0) or a wildcard mask (192.168.1.10 0.0.0.255).
- Read the network, broadcast and host details, which update as you type.
- Switch to Split, VLSM, Range to CIDR or Aggregate to divide a block, plan subnets, or merge blocks.
- Copy any value, or copy a link that reopens the same calculation.
How It Works
A prefix length is the number of leftmost bits that make up the network part of an address. The calculator clears the remaining host bits to get the network address and sets them to get the last address, so a /n block holds 2 to the power of (32 - n) IPv4 addresses or (128 - n) IPv6 addresses. In CIDR notation the prefix length follows the address after a slash.
In IPv4 the network address and the broadcast address of a block are not assigned to hosts (RFC 1122), so a /24 has 254 usable addresses. A /31 is the exception: on a point-to-point link both of its addresses are host addresses (RFC 3021). A /32 is a single address.
IPv6 has no broadcast address; multicast does that job (RFC 4291). The first address of a prefix is the Subnet-Router anycast address, except on a /127 link between routers, where routers disable it (RFC 6164).
IPv6 results use the RFC 5952 text form: lowercase hex digits, no leading zeros, and "::" in place of the longest run of zero groups. When two runs are equally long, the first one is shortened, and "::" never stands for a single zero group. IPv4-mapped addresses use mixed notation, as in ::ffff:192.0.2.1.
Address types come from the IANA IPv4 and IPv6 Special-Purpose Address Registries, last updated 2025-10-09. The most specific entry that contains the address is shown. Globally reachable says whether a packet sent to the address may be forwarded beyond an administrative domain. The registries do not promise that a listed range is routable anywhere.
Addresses with no special-purpose entry fall back to the IANA address space registries: 224.0.0.0/4 is IPv4 multicast, ff00::/8 is IPv6 multicast, 2000::/3 is IPv6 global unicast, and fec0::/10 is the deprecated site-local prefix.
The historical class comes from the first bits of an IPv4 address: 0 for class A, 10 for class B and 110 for class C (RFC 791), 1110 for class D multicast and 1111 for class E (RFC 1112). Reverse DNS names list the IPv4 octets in reverse order under in-addr.arpa (RFC 1035) and the IPv6 nibbles in reverse order under ip6.arpa (RFC 3596).
IPv4 Prefix Reference, /0 to /32
| Prefix | Subnet mask | Wildcard mask | Addresses | Usable hosts |
|---|---|---|---|---|
| /0 | 0.0.0.0 | 255.255.255.255 | 4,294,967,296 | 4,294,967,294 |
| /1 | 128.0.0.0 | 127.255.255.255 | 2,147,483,648 | 2,147,483,646 |
| /2 | 192.0.0.0 | 63.255.255.255 | 1,073,741,824 | 1,073,741,822 |
| /3 | 224.0.0.0 | 31.255.255.255 | 536,870,912 | 536,870,910 |
| /4 | 240.0.0.0 | 15.255.255.255 | 268,435,456 | 268,435,454 |
| /5 | 248.0.0.0 | 7.255.255.255 | 134,217,728 | 134,217,726 |
| /6 | 252.0.0.0 | 3.255.255.255 | 67,108,864 | 67,108,862 |
| /7 | 254.0.0.0 | 1.255.255.255 | 33,554,432 | 33,554,430 |
| /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 |
IPv4 special-purpose addresses (26)
| Block | Name | RFC | Globally reachable |
|---|---|---|---|
| 0.0.0.0/8 | "This network" | RFC 791, Section 3.2 | No |
| 0.0.0.0/32 | "This host on this network" | RFC 1122, Section 3.2.1.3 | No |
| 10.0.0.0/8 | Private-Use | RFC 1918 | No |
| 100.64.0.0/10 | Shared Address Space | RFC 6598 | No |
| 127.0.0.0/8 | Loopback | RFC 1122, Section 3.2.1.3 | No |
| 169.254.0.0/16 | Link Local | RFC 3927 | No |
| 172.16.0.0/12 | Private-Use | RFC 1918 | No |
| 192.0.0.0/24 | IETF Protocol Assignments | RFC 6890, Section 2.1 | No |
| 192.0.0.0/29 | IPv4 Service Continuity Prefix | RFC 7335 | No |
| 192.0.0.8/32 | IPv4 dummy address | RFC 7600 | No |
| 192.0.0.9/32 | Port Control Protocol Anycast | RFC 7723 | Yes |
| 192.0.0.10/32 | Traversal Using Relays around NAT Anycast | RFC 8155 | Yes |
| 192.0.0.170/32 | NAT64/DNS64 Discovery | RFC 8880; RFC 7050, Section 2.2 | No |
| 192.0.0.171/32 | NAT64/DNS64 Discovery | RFC 8880; RFC 7050, Section 2.2 | No |
| 192.0.2.0/24 | Documentation (TEST-NET-1) | RFC 5737 | No |
| 192.31.196.0/24 | AS112-v4 | RFC 7535 | Yes |
| 192.52.193.0/24 | AMT | RFC 7450 | Yes |
| 192.88.99.0/24 | Deprecated (6to4 Relay Anycast) | RFC 7526 | Not listed (terminated 2015-03) |
| 192.88.99.2/32 | 6a44-relay anycast address | RFC 6751 | No |
| 192.168.0.0/16 | Private-Use | RFC 1918 | No |
| 192.175.48.0/24 | Direct Delegation AS112 Service | RFC 7534 | Yes |
| 198.18.0.0/15 | Benchmarking | RFC 2544 | No |
| 198.51.100.0/24 | Documentation (TEST-NET-2) | RFC 5737 | No |
| 203.0.113.0/24 | Documentation (TEST-NET-3) | RFC 5737 | No |
| 240.0.0.0/4 | Reserved | RFC 1112, Section 4 | No |
| 255.255.255.255/32 | Limited Broadcast | RFC 8190; RFC 919, Section 7 | No |
IPv6 special-purpose addresses (25)
| Block | Name | RFC | Globally reachable |
|---|---|---|---|
| ::1/128 | Loopback Address | RFC 4291 | No |
| ::/128 | Unspecified Address | RFC 4291 | No |
| ::ffff:0:0/96 | IPv4-mapped Address | RFC 4291 | No |
| 64:ff9b::/96 | IPv4-IPv6 Translat. | RFC 6052 | Yes |
| 64:ff9b:1::/48 | IPv4-IPv6 Translat. | RFC 8215 | No |
| 100::/64 | Discard-Only Address Block | RFC 6666 | No |
| 100:0:0:1::/64 | Dummy IPv6 Prefix | RFC 9780 | No |
| 2001::/23 | IETF Protocol Assignments | RFC 2928 | No |
| 2001::/32 | TEREDO | RFC 4380; RFC 8190 | N/A |
| 2001:1::1/128 | Port Control Protocol Anycast | RFC 7723 | Yes |
| 2001:1::2/128 | Traversal Using Relays around NAT Anycast | RFC 8155 | Yes |
| 2001:1::3/128 | DNS-SD Service Registration Protocol Anycast | RFC 9665 | Yes |
| 2001:2::/48 | Benchmarking | RFC 5180; RFC Errata 1752 | No |
| 2001:3::/32 | AMT | RFC 7450 | Yes |
| 2001:4:112::/48 | AS112-v6 | RFC 7535 | Yes |
| 2001:10::/28 | Deprecated (previously ORCHID) | RFC 4843 | Not listed (terminated 2014-03) |
| 2001:20::/28 | ORCHIDv2 | RFC 7343 | Yes |
| 2001:30::/28 | Drone Remote ID Protocol Entity Tags (DETs) Prefix | RFC 9374 | Yes |
| 2001:db8::/32 | Documentation | RFC 3849 | No |
| 2002::/16 | 6to4 | RFC 3056 | N/A |
| 2620:4f:8000::/48 | Direct Delegation AS112 Service | RFC 7534 | Yes |
| 3fff::/20 | Documentation | RFC 9637 | No |
| 5f00::/16 | Segment Routing (SRv6) SIDs | RFC 9602 | No |
| fc00::/7 | Unique-Local | RFC 4193; RFC 8190 | No |
| fe80::/10 | Link-Local Unicast | RFC 4291 | No |
Standards
Scope
What It Checks
- +Calculates the network, broadcast, usable range, masks and host counts of IPv4 and IPv6 blocks.
- +Handles /31 and /32 in IPv4, and /127 and /128 in IPv6.
- +Splits a block, plans VLSM subnets, converts ranges to CIDR blocks, and merges CIDR lists.
- +Classifies addresses with the IANA special-purpose address registries.
- +Explains why an input is rejected, such as a leading zero or a mask that is not contiguous.
What It Does Not Check
- -It does not check whether an address is in use or reachable.
- -It does not accept non-contiguous wildcard masks.
- -It does not plan VLSM subnets for IPv6.
- -It does not look up who holds an address.
Defensive Use
RFC 1918 recommends packet and routing filters at the edge of an enterprise network so that private addresses do not leak. The IANA registries mark each special-purpose range as globally reachable or not, which shows the ranges those edge filters should cover. Aggregate mode shows whether a merged allowlist admits addresses beyond the ones you listed.
Frequently Asked Questions
What is a Subnet Calculator?→
The subnet calculator works out the network address, broadcast address, usable host range, subnet mask, wildcard mask and host count of an IPv4 or IPv6 block. Enter an address with a prefix length, a subnet mask or a wildcard mask. Other modes split a block into equal subnets, plan VLSM subnets from host counts, convert an address range to CIDR blocks, and merge a list of blocks. Each address is classified with the IANA special-purpose address registries.
What is the Subnet Calculator used for?→
Planning subnets for an office network or a cloud VPC, checking which addresses a firewall rule or allowlist covers, and confirming whether an address is private, reserved for documentation or otherwise special-purpose.
Is my data sent anywhere?→
No. The Subnet Calculator runs in your browser. What you enter stays on this page and is not sent to ImmunitySec or anyone else.
How is the Subnet Calculator used defensively?→
RFC 1918 recommends packet and routing filters at the edge of an enterprise network so that private addresses do not leak. The IANA registries mark each special-purpose range as globally reachable or not, which shows the ranges those edge filters should cover. Aggregate mode shows whether a merged allowlist admits addresses beyond the ones you listed.
How many usable hosts are in a /24?→
254. A /24 holds 256 addresses, and its first address (the network address) and last address (the broadcast address) are not assigned to hosts (RFC 1122).
Why does a /31 have two usable addresses?→
RFC 3021 says that on a point-to-point link with a 31-bit mask, both addresses are host addresses. The link has no directed broadcast address and uses the limited broadcast address for broadcast traffic.
What is a wildcard mask?→
A wildcard mask, also called an inverse mask, is the bitwise opposite of a subnet mask. In Cisco access lists, each 0 bit of a wildcard mask must match exactly and each 1 bit is ignored. The wildcard mask for 255.255.255.0 is 0.0.0.255.
Does IPv6 have a broadcast address?→
No. RFC 4291 states that IPv6 has no broadcast addresses and that multicast addresses take over their function.
Why use a /127 on links between routers?→
RFC 6164 recommends 127-bit prefixes on inter-router point-to-point links, for security and other reasons. Routers must disable Subnet-Router anycast on these links, so both addresses are usable.
Which IPv4 ranges are private?→
RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 for private networks. RFC 6598 sets aside 100.64.0.0/10 as shared address space. The IANA registry marks all four as not globally reachable.
Why do cloud subnets have fewer usable addresses?→
Cloud providers keep some addresses of every subnet for themselves. AWS and Azure reserve the first four addresses and the last address of each subnet. Google Cloud uses the first two and last two addresses of each primary IPv4 range.
How is the short form of an IPv6 address chosen?→
RFC 5952 sets one text form: leading zeros are dropped, hex letters are lowercase, and "::" replaces the longest run of zero groups. When two runs are equally long, the first is shortened, and "::" never stands for a single zero group.