IPv4 subnet (CIDR) calculator
Spin up a server and build your own network →
Reading CIDR notation
In 192.168.1.0/24 the number after the slash is how many leading bits identify the network. The remaining bits number the hosts: a /24 leaves 8 bits, so 256 addresses, of which 254 are usable (the first is the network address, the last is broadcast).
Common subnet sizes
| CIDR | Netmask | Usable hosts |
|---|---|---|
| /32 | 255.255.255.255 | 1 |
| /30 | 255.255.255.252 | 2 |
| /29 | 255.255.255.248 | 6 |
| /28 | 255.255.255.240 | 14 |
| /27 | 255.255.255.224 | 30 |
| /26 | 255.255.255.192 | 62 |
| /24 | 255.255.255.0 | 254 |
| /22 | 255.255.252.0 | 1,022 |
| /20 | 255.255.240.0 | 4,094 |
| /16 | 255.255.0.0 | 65,534 |
| /8 | 255.0.0.0 | 16,777,214 |
Where you'll meet subnets on a VPS
- Firewall rules:
ufw allow from 203.0.113.0/24 to any port 22lets a whole office network in. - Private networks between servers (VPC), WireGuard tunnels (
10.8.0.0/24) and Docker bridges (172.17.0.0/16). - IPv6: a VPS usually gets a whole
/64— more addresses than the entire IPv4 internet.
FAQ
How many hosts are in a /24?
256 addresses, 254 usable for hosts.
What is a wildcard mask?
The inverse of the netmask (0.0.0.255 for a /24). Some firewalls and routers use it instead of a netmask.
Why do /31 and /32 have no broadcast?
/32 is a single host and /31 is a point-to-point link (RFC 3021) — both use every address.
Our pick
Deploy a VPS on Kvantis
Hourly billing, paid in crypto, no KYC. Your server is live in about a minute.
- Plans from $10/month + VAT, billed per hour — destroy anytime
- 32 locations worldwide, IPv4 + IPv6, full root
- BTC, ETH, USDT, USDC, LTC and 30+ coins; just an email to sign up
Disclosure: Kvnthost is run by the team behind Kvantis.