IPv4 subnet calculator for CIDR blocks and netmasks
Updated:
Paste an address in CIDR form, for example 203.0.113.77/27, or follow it with a dotted netmask such as 172.16.4.1 255.255.252.0. The calculator returns the network ID, broadcast, netmask, wildcard, the assignable range and how many hosts it holds, and it can carve the block into equal smaller pieces. All of the arithmetic happens locally in your browser. To see which provider and network a single address belongs to, try the IP lookup.
- Network ID
- 192.168.1.0/24
- Broadcast
- 192.168.1.255
- Netmask
- 255.255.255.0
- Wildcard (inverse mask)
- 0.0.0.255
- Assignable range
- 192.168.1.1 – 192.168.1.254
- Assignable hosts
- 254
- Addresses in block
- 256
- Legacy class
- C
- Address type
- Private, RFC 1918
- Netmask bits
- 11111111.11111111.11111111.00000000
Divide this block
| Block | First usable | Last usable | Broadcast |
|---|---|---|---|
| 192.168.1.0/26 | 192.168.1.1 | 192.168.1.62 | 192.168.1.63 |
| 192.168.1.64/26 | 192.168.1.65 | 192.168.1.126 | 192.168.1.127 |
| 192.168.1.128/26 | 192.168.1.129 | 192.168.1.190 | 192.168.1.191 |
| 192.168.1.192/26 | 192.168.1.193 | 192.168.1.254 | 192.168.1.255 |
Quick reference: prefix lengths in practice
Two addresses in each block are normally reserved, the all-zeros network ID and the all-ones broadcast, so assignable hosts equal the block size minus two. Point-to-point /31 links skip that reservation under RFC 3021, and a /32 names exactly one machine.
| Prefix | Assignable of total | Netmask | Where you meet it |
|---|---|---|---|
| /16 | 65,534 of 65,536 | 255.255.0.0 | Large campus or provider allocation |
| /20 | 4,094 of 4,096 | 255.255.240.0 | Regional hosting pool |
| /22 | 1,022 of 1,024 | 255.255.252.0 | Common small allocation from a regional registry |
| /23 | 510 of 512 | 255.255.254.0 | Two adjacent /24 blocks |
| /24 | 254 of 256 | 255.255.255.0 | Longest prefix generally accepted in global BGP routing |
| /25 | 126 of 128 | 255.255.255.128 | Half a /24 |
| /26 | 62 of 64 | 255.255.255.192 | Office VLAN |
| /27 | 30 of 32 | 255.255.255.224 | Server rack segment |
| /28 | 14 of 16 | 255.255.255.240 | Small static IP order from an ISP |
| /29 | 6 of 8 | 255.255.255.248 | Business line with a few static IPs |
| /30 | 2 of 4 | 255.255.255.252 | Classic router-to-router link |
| /31 | 2 of 2 | 255.255.255.254 | Point-to-point link, RFC 3021 |
| /32 | 1 of 1 | 255.255.255.255 | Single address, such as one proxy IP |
The arithmetic behind the results
- IPv4 addresses are 32-bit numbers. The prefix length counts the leading bits shared by the whole network; the remaining bits number individual machines.
- Clearing every host bit gives the network ID, setting every host bit gives the broadcast, and everything in between is assignable.
- The wildcard is the netmask flipped bit by bit. Cisco IOS access lists and OSPF statements are written with it.
- The legacy class (A to E) comes from the first octet and is shown for reference only; routing has ignored classes since CIDR arrived in 1993.
- Three blocks never reach the public internet:
10.0.0.0/8,172.16.0.0/12and192.168.0.0/16. The calculator labels them private.
Reading proxy IPs by subnet
Fraud systems rarely stop at the single address. Several accounts arriving from one /24 look like one operator even when every IP is different, and an abuse flag on a neighbour can spill over to the whole range. When you plan a pool of dedicated proxies for separate accounts (see how many accounts per proxy), paste each address here and note its /24 network ID: addresses that share one belong together in the eyes of most platforms. ProxyV4 sells private IPv4 across 7 countries and static ISP IPs in the US and Vietnam, so a pool can span different blocks and locations.
Step by step
- 1
Type a network
Enter an IPv4 address followed by
/prefix, or by a space and a dotted netmask. - 2
Adjust the prefix length
Pick another value from the drop-down to watch the block widen or narrow around the same address.
- 3
Copy the figures
Every field refreshes with each keystroke, so you can paste the values straight into a firewall rule or router config.
- 4
Divide the block
Choose a longer prefix under the results to list the equal subnets that fit inside.
Frequently asked questions
How many devices fit on a /24 network?
254. The block holds 256 addresses, but the one ending in .0 identifies the network and the one ending in .255 is the broadcast.
How do I convert a netmask to a prefix length?
Count the one-bits. 255.255.252.0 is 22 ones followed by zeros, so it equals /22. Typing the mask after the address here does the conversion for you, and masks with gaps in the ones are rejected as invalid.
Can I calculate IPv6 prefixes here?
Not at the moment; the tool handles IPv4 only.
Does anything I type get uploaded?
No. The page computes everything in JavaScript on your device and sends nothing to a server.
Building a pool across separate ranges?
ProxyV4 private IPv4 in 7 countries, each address rented to a single customer, unlimited bandwidth, delivered within minutes.
Compare proxy plans