DevOps & Cloud Tools
IP Subnet (CIDR) Calculator
Compute network, broadcast, host range and masks for any CIDR.
IPv4 address or CIDR block
Subnet details
- Network address
- 10.24.8.0/22
- Broadcast address
- 10.24.11.255
- First usable host
- 10.24.8.1
- Last usable host
- 10.24.11.254
- Netmask
- 255.255.252.0 (/22)
- Wildcard mask
- 0.0.3.255
- Total addresses
- 1,024
- Usable hosts
- 1,022
- Range classification
- RFC 1918 (10/8)
- Legacy class
- Class A
Membership check
Subnet sizing
A /23 gives 512 addresses and 510 usable hosts.
Binary layout
network portion / host portionAddress
00001010.00011000.00001000.00000000
Netmask
11111111.11111111.11111100.00000000
The leading 22 bits identify the network; the remaining 10 bits are available for hosts. The first and last addresses of the block are reserved as network and broadcast.
About IP Subnet Calculator
Subnetting is arithmetic on the binary form of an IPv4 address, which makes it tedious by hand and easy to get wrong at the boundaries. Knowing the network address, the broadcast address and the usable host range is the difference between a security group rule that works and one that silently excludes traffic.
This calculator accepts any address and prefix length, shows the binary layout of the network portion, and reports the netmask, wildcard mask and host count. It also checks whether a second address falls inside the subnet, and sizes the subnet for a requested number of hosts when you are planning new ranges.
How it works
- The address is converted to a 32-bit integer and split at the prefix length.
- The network address is the address with all host bits cleared.
- The broadcast address is the address with all host bits set.
- The usable host range excludes the network and broadcast addresses for prefixes shorter than /31.
- A point-to-point prefix such as /31 has two usable addresses, and /32 is treated as a single host.
- The wildcard mask is the bitwise inverse of the netmask and is used by some router and firewall syntaxes.
Input and output
Accepts
An IPv4 address with a prefix length, and optionally a second address to test for membership.
Produces
Network address, broadcast address, host range, netmask, wildcard mask, host count and binary layout.
Privacy
All arithmetic is performed locally with integer operations. No address is looked up or transmitted.
IP Subnet Calculator FAQ
How many usable hosts does a /24 have?
A /24 contains 256 addresses. Reserving the network and broadcast addresses leaves 254 usable host addresses.
Why do cloud providers reserve extra addresses per subnet?
AWS, Azure and GCP reserve the first few addresses of every subnet for the gateway, DNS and future use, so a /24 often yields fewer usable addresses than the theoretical 254.
What is a wildcard mask used for?
Wildcard masks invert the netmask and appear in Cisco ACLs and some firewall rules, where a 0 bit means match exactly and a 1 bit means ignore.
Does this tool support IPv6?
No. IPv6 uses a different address structure and is intentionally out of scope here. Use a dedicated IPv6 prefix calculator for those ranges.
Related developer tools
Nginx Config Generator
Generate Nginx server blocks for proxies and static sites.
Cron Expression Parser
Explain any cron expression and list the next run times.
Kubernetes YAML Generator
Generate Kubernetes manifests with matching selectors and labels.