IP Subnet Calculator
Type an address with a prefix length or mask — 192.168.1.10/24, 10.0.0.0 255.255.248.0 or 2001:db8:abcd::/48 — and get the network and broadcast addresses, the usable host range, the subnet and wildcard masks, a binary view, and any special-purpose range the block touches. Then cut the block into equal subnets by prefix, subnet count or hosts per subnet. Free, no sign-up, and everything runs in your browser.
IPv4 such as 192.168.1.10/24 or 192.168.1.10 255.255.255.0, or IPv6 such as 2001:db8:abcd::1/48. A zone suffix like %eth0 is ignored.
Result
192.168.1.0/24
Network
254
Usable addresses
256
Total addresses
A usable address
Your address is
Details
| Property | Value |
|---|---|
| Address | 192.168.1.10 |
| Prefix length | /24 |
| Subnet mask | 255.255.255.0 |
| Wildcard mask | 0.0.0.255 |
| Network address | 192.168.1.0 |
| Broadcast address | 192.168.1.255 |
| First usable address | 192.168.1.1 |
| Last usable address | 192.168.1.254 |
| Total addresses | 256 |
| Usable hosts | 254 |
| Legacy class | Class C (historical) |
In binary
| Address | 11000000.10101000.00000001.00001010 |
|---|---|
| Mask | 11111111.11111111.11111111.00000000 |
| Network | 11000000.10101000.00000001.00000000 |
Bold digits are the network part, the first 24 bits; faint digits are the host part.
Special-purpose ranges
Blocks that overlap the one you entered, from RFC 6890 and the IANA special-purpose registries. An empty list means it falls in ordinary public space.
| Range | Block | Defined in | Relationship |
|---|---|---|---|
| Private-use network | 192.168.0.0/16 | RFC 1918 | The whole block is inside this range |
Split into subnets
A prefix length from /24 to /32, such as 26.
4 subnets of /26: each has 64 addresses, 62 usable.
| # | Network | Usable range | Broadcast | Usable |
|---|---|---|---|---|
| 1 | 192.168.1.0/26 | 192.168.1.1 – 192.168.1.62 | 192.168.1.63 | 62 |
| 2 | 192.168.1.64/26 | 192.168.1.65 – 192.168.1.126 | 192.168.1.127 | 62 |
| 3 | 192.168.1.128/26 | 192.168.1.129 – 192.168.1.190 | 192.168.1.191 | 62 |
| 4 | 192.168.1.192/26 | 192.168.1.193 – 192.168.1.254 | 192.168.1.255 | 62 |
How to Use the IP Subnet Calculator
- 1. Enter an address and a prefix. Write
192.168.1.10/24, or give a dotted mask instead:192.168.1.10 255.255.255.0. An address containing a colon is read as IPv6. - 2. Read the block. The details table shows the network and broadcast addresses, the first and last usable host, the number of usable hosts, and the masks. For IPv4 a binary table lines up the address, mask and network.
- 3. Check the ranges. The calculator lists any RFC 1918 private, loopback, link-local, documentation or other special-purpose range your block overlaps.
- 4. Split it if you need to. Choose a new prefix, a number of subnets or a number of hosts per subnet, and copy the resulting list.
How an IPv4 Subnet Is Calculated
A prefix length of p means the first p bits of the address name the network and the remaining 32 − p bits name the host. The subnet mask is p ones followed by zeros, and the wildcard mask is its inverse. Three operations give everything else:
- Network address = address AND mask — clear all the host bits.
- Broadcast address = network OR wildcard — set all the host bits.
- Usable hosts = 232 − p − 2 — every address except the network and broadcast addresses (RFC 950).
Worked Example: 172.16.37.200/20
- Mask: 20 ones is
11111111.11111111.11110000.00000000, or 255.255.240.0. The wildcard is 0.0.15.255. - Network: only the third octet is split by the mask. 37 is
00100101and 240 is11110000; ANDed they give00100000, which is 32. The network is 172.16.32.0/20. - Broadcast: OR the network with the wildcard: 32 + 15 = 47 in the third octet and 255 in the fourth, so 172.16.47.255.
- Hosts: the usable range is 172.16.32.1 to 172.16.47.254, which is 212 − 2 = 4,094 addresses.
Common Prefix Lengths
| Prefix | Subnet mask | Total addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /24 | 255.255.255.0 | 256 | 254 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 (RFC 3021) |
| /32 | 255.255.255.255 | 1 | 1 (host route) |
The last two rows break the "subtract two" rule. A /31 has no room for a network and a broadcast address, but on a point-to-point link neither is needed, so RFC 3021 lets both addresses be used by the two ends. A /32 is a single address, used for host routes and loopbacks. The calculator applies both exceptions.
Private and Special Ranges
Three blocks are reserved for private networks by RFC 1918: 10.0.0.0/8, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16. They are not routed on the public internet. Other IPv4 blocks have fixed jobs too — 127.0.0.0/8 is loopback, 169.254.0.0/16 is link-local (what a machine falls back on when DHCP fails), 100.64.0.0/10 is shared address space for carrier-grade NAT (RFC 6598), and 192.0.2.0/24, 198.51.100.0/24 and 203.0.113.0/24 are reserved for documentation (RFC 5737). The full list is RFC 6890 and the IANA special-purpose registries, which the calculator checks your block against.
Splitting a Block into Subnets
Every bit you add to the prefix halves the subnet size and doubles the subnet count. Cutting 192.168.1.0/24 into four equal parts needs two more bits, so four /26 subnets: 192.168.1.0, .64, .128 and .192, each with 62 usable hosts. To size subnets by need instead, ask for hosts per subnet — the calculator adds the two reserved addresses and rounds up to the next power of two, so 50 hosts per subnet gives /26. Subnets of different sizes (VLSM) are made by splitting once, then splitting one of the results again.
IPv6 Prefixes
IPv6 addresses are 128 bits, written as eight groups of up to four hex digits (RFC 4291). The calculator prints the canonical short form from RFC 5952: lower case, no leading zeros, and the longest run of two or more all-zero groups replaced by ::. There is no broadcast address — multicast does that job — so every address in a prefix counts as usable. Ordinary subnets are a /64, leaving 64 bits for the interface identifier, and a site commonly receives a /48 or /56 to carve /64s from: a /48 holds 65,536 of them. A /127 is used on links between two routers, as RFC 6164 describes.
Frequently Asked Questions
- How do you find the network address from an IP address and subnet mask?
- Write both in binary and AND them bit by bit: a bit is 1 only where both are 1. For 172.16.37.200 and 255.255.240.0 the result is 172.16.32.0. Only the octets the mask splits need working out — octets covered by 255 are copied and octets covered by 0 become 0.
- How many usable hosts are in a /24, /26 or /28?
- Use 232 − prefix − 2. A /24 has 254, a /26 has 62 and a /28 has 14. The two subtracted addresses are the network address, which names the subnet, and the broadcast address, which reaches every host on it.
- Why are two addresses not usable in an IPv4 subnet?
- The all-zeros host address identifies the subnet itself and the all-ones host address is the directed broadcast, so neither can be assigned to a machine. The exceptions are a /31, where RFC 3021 lets both addresses serve point-to-point links, and a /32, which is a single host.
- What is the difference between a subnet mask and a wildcard mask?
- They are inverses. A subnet mask has ones for the network bits (255.255.255.0), a wildcard mask has ones for the host bits (0.0.0.255). Routers and firewall access lists such as Cisco's use the wildcard form to say which bits of an address may vary.
- What is CIDR notation?
- Classless Inter-Domain Routing writes a network as an address plus the number of leading network bits, like 203.0.113.0/24. It replaced the old class A, B and C system (RFC 4632), which fixed the boundary at 8, 16 or 24 bits and wasted addresses. Today the prefix length can be anything from /0 to /32.
- Which IP addresses are private?
- RFC 1918 reserves 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255 and 192.168.0.0 to 192.168.255.255. In IPv6 the equivalent is the unique local range fc00::/7 (in practice fd00::/8), defined in RFC 4193. Addresses from these ranges are only reachable inside a network unless translated.
- What size IPv6 subnet should I use?
- A /64 for any ordinary LAN, because stateless address autoconfiguration expects a 64-bit interface identifier. Use /127 for router-to-router links and /128 for a single loopback address. Splitting a LAN below /64 breaks autoconfiguration, so allocate more /64s instead of smaller subnets.