192.168.1.0192.168.1.255192.168.1.1192.168.1.254255.255.255.00.0.0.255254256About IPv4 Subnet Calculator
255.255.255.0 is /24: 256 addresses per subnet, 254 usable — the first and last address are reserved for the network and broadcast, so they never reach a host.
This subnet mask calculator accepts either notation: 192.168.1.10/24 or 192.168.1.10 255.255.255.0. If you only want the prefix length, paste 255.255.255.0 on its own and the results show the matching prefix, capacity and wildcard mask.
A wildcard mask is the bitwise inverse of the subnet mask: /24 gives 0.0.0.255. Cisco ACLs, some firewalls and routing protocols take wildcard masks while interfaces and routing tables take subnet masks, and mixing them up is a common reason a rule silently fails to match.
/31 and /32 deserve a closer look. A /31 holds 2 addresses, and the classic rule (subtract network and broadcast) reports 0 usable, which is what this page shows. RFC 3021 nevertheless allows both addresses on a point-to-point link, so a /31 between two routers wastes nothing — check that both ends support it before planning. A /32 is a single address, used for host routes, loopback interfaces and keepalived VIPs.
Splitting costs addresses: Cutting a /24 into four /26 leaves 4x62 = 248 usable out of 256; the remaining 8 became four network/broadcast pairs, and every additional cut costs two more addresses plus one more route entry.
Non-byte masks are the easiest to misremember: /25 is 255.255.255.128, /26 is .192, /27 is .224, /28 is .240, /29 is .248, /30 is .252 — each step halves the last octet increment. If you cannot recall it, paste the dotted mask and read the prefix back instead of doing mental arithmetic.
How It Works Internally
Usable hosts = 2^(32 - prefix) - 2. The two removed addresses are the network address (host bits all zero) and the broadcast address (host bits all one); both carry layer-2 meaning and cannot be assigned to a NIC. Subnet mask and wildcard mask are a pair: the mask marks network bits with contiguous ones, the wildcard marks the same positions with zeros, so 255.255.255.0 inverts to 0.0.0.255. There is no shortcut, it is a bitwise inversion.
192.168.1.10 255.255.255.192/26 · network 192.168.1.0 · broadcast 192.168.1.63 · 62 usableMeasured on This Page
| /24 · 255.255.255.0 | 256 addresses / 254 usable |
|---|---|
| /25 · 255.255.255.128 | 128 addresses / 126 usable |
| /26 · 255.255.255.192 | 64 addresses / 62 usable |
| /28 · 255.255.255.240 | 16 addresses / 14 usable |
| /30 · 255.255.255.252 | 4 addresses / 2 usable, the usual point-to-point choice |
| /31 · 255.255.255.254 | 2 addresses / this page reports 0 usable by the classic rule |
/31 is the one row that needs a caveat: RFC 3021 lets both addresses be used on a point-to-point link, so a /31 wastes nothing, yet the classic formula (network and broadcast excluded) yields 0 and this page follows it. A mask is not a prefix either: 255.255.255.0 is a mask, /24 is a prefix, they are equivalent but not interchangeable notation, and the input takes both. A non-contiguous mask such as 255.0.255.0 is rejected instead of being rounded to the nearest prefix.
How to Use
- Enter a CIDR such as 192.168.1.10/24, or 192.168.1.10 255.255.255.0
- To convert a mask only, enter 255.255.255.0 by itself
- Read network, broadcast, first and last host, netmask, wildcard and usable hosts at once
- Use the copy button on any card to paste a single value into config or a ticket
- Re-run with another prefix to compare usable hosts against route entries
Use Cases
- Split a /24 across departments — Cut 192.168.10.0/24 into four /26 subnets of 62 hosts each, then verify no range lost extra addresses to gateways and broadcasts.
- Check an ACL or security group — Confirm the network and wildcard mask cover exactly the range you mean to allow — one extra wildcard bit doubles the permitted address space.
- Point-to-point: /30 or /31 — /30 is universally understood but wastes two addresses; /31 wastes none when both ends support RFC 3021. Look at the peer device first.
- Test whether two hosts share a subnet — Similar IPs with different masks are the classic false positive. AND each address with its own mask; only equal network addresses mean the same subnet.
- Plan VPC and availability-zone ranges — Give each zone its own /24 so later growth can still be summarised into one route instead of scattered fragments.
FAQ
How many bits is 255.255.255.0?
/24. That is 256 addresses per subnet and 254 usable once the network and broadcast addresses are removed. Paste 255.255.255.0 on its own to see the conversion directly.
How many bits is 255.255.255.192?
/26, which is 64 addresses and 62 usable. Each step of the last octet (128, 192, 224, 240, 248, 252) adds one bit to the prefix.
Why does a /24 only give 254 usable hosts?
The all-zero host part identifies the network itself and the all-one host part is the broadcast address; both have special meaning and cannot be assigned to a NIC, so usable hosts are 2 to the power of host bits, minus 2.
This page says a /31 has 0 usable — is it still usable?
Yes. RFC 3021 allows both addresses of a /31 on a point-to-point link, one per end. This page reports 0 to stay consistent with the classic /24 and /30 convention; verify both devices support the RFC before deploying.
What is the difference between a subnet mask and a wildcard mask?
A subnet mask uses contiguous ones for the network portion (255.255.255.0); a wildcard mask inverts it so ones mark the bits that may vary (0.0.0.255). ACLs and OSPF take wildcards, interfaces and routing tables take masks.
How do I tell whether two hosts are on the same subnet?
AND each address with its own mask and compare the resulting network addresses. When the masks differ you cannot judge by the IP prefix alone.
Which input formats are accepted?
Three: 192.168.1.10/24, 192.168.1.10 255.255.255.0, and a bare 255.255.255.0 to convert a mask to a prefix. The mask must be contiguous ones, so 255.0.255.0 is rejected.
Is IPv6 supported?
No. This page does only 32-bit IPv4 arithmetic; IPv6 prefix semantics and address scale differ enough that mixing them into one result table would mislead.