IP Subnet Calculator
Paste an address with its prefix – 10.0.0.0/16 or 192.168.1.200/27 – to get the network, broadcast, host range and masks in decimal and binary. Then split the block into equal subnets, or list how many hosts each LAN needs and get a VLSM plan, largest subnet first.
Quick answer: 192.168.1.10/24 belongs to network 192.168.1.0 with subnet mask 255.255.255.0 and broadcast address 192.168.1.255, leaving 254 usable hosts (192.168.1.1 – 192.168.1.254). Usable hosts = 2^(32 − prefix) − 2.
Not rated yet · Updated · Free · No sign-up
IP Subnet Calculator inputs
Result
Network
192.168.1.0/24
254 usable hosts · Private (RFC 1918)
| IP address | 192.168.1.10 |
| Network address | 192.168.1.0 |
| Broadcast address | 192.168.1.255 |
| First usable host | 192.168.1.1 |
| Last usable host | 192.168.1.254 |
| Subnet mask | 255.255.255.0 |
| Wildcard mask | 0.0.0.255 |
| CIDR notation | /24 |
- Total addresses
- 256
- Usable hosts
- 254
- IP class
- C
- Reverse DNS zone
- 1.168.192.in-addr.arpa
Calculated with CalcBright – https://calcbright.com/ip-subnet-calculator on
Binary view
| Dotted decimal | Binary | |
|---|---|---|
| IP address | 192.168.1.10 | 11000000.10101000.00000001.00001010 |
| Subnet mask | 255.255.255.0 | 11111111.11111111.11111111.00000000 |
| Wildcard | 0.0.0.255 | 00000000.00000000.00000000.11111111 |
| Network | 192.168.1.0 | 11000000.10101000.00000001.00000000 |
| Broadcast | 192.168.1.255 | 11000000.10101000.00000001.11111111 |
The first 24 bits are the network part; the remaining 8 bits number the hosts.
4 subnets of /26
| # | Network | Usable range | Broadcast | Hosts |
|---|---|---|---|---|
| 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 |
Common prefix lengths
| CIDR | Subnet mask | 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 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 512 | 510 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 |
| /32 | 255.255.255.255 | 1 | 1 |
How a subnet is worked out
An IPv4 address is 32 bits, written as four numbers from 0 to 255. The prefix length – the /24 in 192.168.1.10/24 – says how many of those bits, counted from the left, name the network; the rest number the hosts inside it. Since CIDR replaced the old A/B/C classes (RFC 4632), the prefix can be anything from /0 to /32, and the class shown by the calculator is only a historical label.
Network = IP AND mask · Broadcast = network OR wildcard · Wildcard = NOT mask
Addresses = 2^(32 − prefix) · Usable hosts = addresses − 2 (except /31 and /32)
The first address of every subnet is the network address and the last is the broadcast address, so neither can be given to a device. That is why a /24 has 256 addresses but 254 hosts.
Worked examples
192.168.1.200/27 by hand
27 one-bits give the mask 255.255.255.224. The interesting octet is the fourth: 256 − 224 = 32, so subnets start at 0, 32, 64, 96, 128, 160, 192 and 224. 200 lies between 192 and 223, so the network is 192.168.1.192, the broadcast 192.168.1.223 and the hosts run from .193 to .222 – 30 usable. The wildcard is 0.0.0.31.
A classic exam question: 172.20.130.7/20
Here the boundary falls in the third octet. The mask is 255.255.240.0, so third-octet blocks are 256 − 240 = 16 wide: 112, 128, 144 … 130 is in the block starting at 128. Network 172.20.128.0, broadcast 172.20.143.255, hosts 172.20.128.1 to 172.20.143.254 – 4,096 addresses and 4,094 usable hosts, wildcard 0.0.15.255.
VLSM for a head office and branches
Say 192.168.10.0/24 must cover a head-office LAN of 100 devices, a branch of 50, a small office of 20 and a router-to-router link. Enter 100, 50, 20, 2 and the calculator sizes each one – 100 hosts need a /25 (126), 50 a /26 (62), 20 a /27 (30), 2 a /30 – and places them largest first: 192.168.10.0/25, 192.168.10.128/26, 192.168.10.192/27 and 192.168.10.224/30. That uses 228 of 256 addresses and leaves 28 from 192.168.10.228. Asking for 120, 60, 30, 30 and 2 hosts in a /24 needs 260 addresses, so the calculator says it doesn’t fit and that you need a /23.
Subnet cheat sheet
| CIDR | Subnet mask | Wildcard | Addresses | Usable hosts |
|---|---|---|---|---|
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 |
| /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 (point-to-point) |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
Rules that change the answer
- /31 and /32: under RFC 3021 a /31 has no network or broadcast address, so both addresses are hosts; a /32 is one host. The calculator shows “none” for their broadcast.
- Equal splits round up: subnets come in powers of two, so asking for 5 or 6 subnets of a /24 gives eight /27s, and the heading tells you how many you asked for.
- A /29 from your ISP: a block such as 203.0.113.8/29 has 6 usable addresses (.9 to .14), and your provider’s gateway normally takes one of them, leaving 5 for your own equipment.
- Special ranges: the calculator flags private (RFC 1918), carrier-grade NAT (100.64.0.0/10), link-local (169.254.0.0/16), loopback, documentation and benchmarking (198.18.0.0/15) addresses, which are not reachable on the public internet.
Common mistakes
- Forgetting the router: a LAN of 30 PCs plus a gateway is 31 hosts, which no longer fits a /27.
- Allocating VLSM blocks smallest first. A /30 placed at .0 forces the next /25 up to .128 and wastes space – or overlaps if you start it at .4.
- Typing a host address as the network in a route or ACL: 192.168.1.10/24 is a host; the route is 192.168.1.0/24.
- Using 172.32.x.x as private space – the RFC 1918 block stops at 172.31.255.255.
Where public addresses come from
Public IPv4 space in the Gulf and the wider Middle East is managed by RIPE NCC, which made its last /22 allocation on 25 November 2019. New members can only join a waiting list for a single /24, so most businesses get public addresses from their ISP or buy them on the transfer market. Plan internal networks in RFC 1918 space and keep public blocks for what really needs them.
For production changes – re-addressing a live network, overlapping ranges after a merger or VPN, or routing a provider-assigned block – check the plan with your network team or provider before you apply it.
Frequently asked questions
How many usable hosts are in a /24, /27 or /29?
Take 2 to the power of the host bits and subtract 2 for the network and broadcast addresses: a /24 has 256 − 2 = 254, a /27 has 32 − 2 = 30 and a /29 has 8 − 2 = 6 usable hosts.
How do I turn a CIDR prefix into a subnet mask?
Write the prefix as that many 1-bits followed by 0-bits and read each group of 8 as a number. /20 is 11111111.11111111.11110000.00000000, which is 255.255.240.0. The only octet values a mask can have are 0, 128, 192, 224, 240, 248, 252, 254 and 255.
How do I find the network and broadcast address?
Use the block size, 256 minus the mask octet that isn’t 0 or 255. For 192.168.1.200/27 the mask is 255.255.255.224, so blocks are 32 wide; 200 falls in the block starting at 192 – network 192.168.1.192, broadcast 192.168.1.223, hosts .193 to .222.
What is a wildcard mask?
The subnet mask with every bit flipped – in decimal, 255 minus each octet. 255.255.240.0 becomes 0.0.15.255. Cisco ACLs and OSPF network statements use it: 0 bits must match, 1 bits can be anything.
Which IP address ranges are private?
RFC 1918 reserves 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. 100.64.0.0/10 is different: RFC 6598 sets it aside for carrier-grade NAT inside an ISP, and it should not be used for an office LAN.
How do I split a /24 into four subnets?
Four subnets need 2 more network bits, so each becomes a /26 of 64 addresses: 192.168.1.0, .64, .128 and .192, each with 62 usable hosts. Asking for 5 subnets needs 3 bits, giving eight /27s of 30 hosts.
How does VLSM work?
Each subnet gets the smallest block that fits its hosts, allocated largest first so nothing overlaps. For LANs of 100, 50, 20 and 2 hosts in 192.168.10.0/24 that is .0/25, .128/26, .192/27 and .224/30 – 228 addresses used, 28 left from 192.168.10.228.
Can I use a /31 or a /32?
Yes. RFC 3021 lets a point-to-point link use a /31 with both addresses as hosts, saving two addresses per link compared with a /30. A /32 is a single address, used for loopback interfaces and host routes.
What changed
- – Page fully reviewed: VLSM planning added (hosts per subnet, largest first, with addresses left or the prefix you need), documentation, benchmarking and limited-broadcast addresses now labelled; new worked examples, cheat sheet and sources.
- – RIPE NCC, the registry that serves Europe and the Middle East including the Gulf states, made its final /22 IPv4 allocation; new members can now only join a waiting list for a single /24.
Sources
- RFC 950 – Internet Standard Subnetting Procedure (IETF)
- RFC 4632 – Classless Inter-domain Routing (CIDR) (IETF)
- RFC 1918 – Address Allocation for Private Internets (IETF)
- RFC 3021 – Using 31-Bit Prefixes on IPv4 Point-to-Point Links (IETF)
- RFC 6598 – IANA-Reserved IPv4 Prefix for Shared Address Space (IETF)
- RFC 5737 – IPv4 Address Blocks Reserved for Documentation (IETF)
- IANA IPv4 Special-Purpose Address Registry
- RIPE NCC – The RIPE NCC has run out of IPv4 addresses (25 November 2019)
Last reviewed: ·
Reviewed by Chelsea, CalcBright's animated guide, for the CalcBright editorial team · How we check our numbers
Rate the IP Subnet Calculator
Only the average star rating is shown. Error reports go straight to our inbox so we can check and fix them. See our Methodology and privacy policy.