Complete guide
IPv4 subnet calculator for CIDR, masks and host ranges
Enter an IPv4 address and CIDR prefix. Calculator24 returns the network, subnet mask, wildcard mask, broadcast address, total addresses and conventional usable range immediately.
What CIDR notation means
IPv4 addresses contain 32 bits. A prefix such as /24 says the first 24 bits identify the network while eight bits remain for addresses inside that block.
Subnet formulas
The total address count doubles each time the prefix becomes one bit shorter. A bitwise AND between the address and mask produces the network address.
addresses=2^(32−prefix)network=address AND maskbroadcast=network OR wildcard maskWorked /24 example
For 192.168.1.10/24, the mask keeps the first three octets. The resulting block begins at 192.168.1.0 and contains 256 addresses through 192.168.1.255.
Usable hosts and reserved endpoints
Traditional /0 through /30 IPv4 subnets reserve the all-zero host address for the network and the all-one host address for broadcast. That leaves two fewer conventional hosts than total addresses.
Why /31 and /32 are special
RFC 3021 permits both addresses of a /31 on a point-to-point link. A /32 identifies one address, often as a host route; neither case follows the traditional subtract-two rule.
Use the result in context
A calculated block does not configure a router, assign DHCP ranges or prove that an address is public. Check the routing design, private-address policy and device documentation before applying changes.
Common IPv4 prefixes
| Prefix | Mask | Total addresses | Conventional usable |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /24 | 255.255.255.0 | 256 | 254 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 on point-to-point |
| /32 | 255.255.255.255 | 1 | 1 host route |
Frequently asked questions
How many addresses are in a /24?
A /24 contains 256 total IPv4 addresses.
Why are two addresses often unavailable?
Traditional subnets reserve the network and broadcast endpoints.
Can a /31 have usable addresses?
Yes. RFC 3021 defines /31 use for point-to-point links.
What is a wildcard mask?
It is the bitwise inverse of the subnet mask.
Does this support IPv6?
No. This calculator is specifically for 32-bit IPv4 addresses.
Does the calculator change my network?
No. It only performs local address arithmetic in the browser.
What to keep in mind
The usable-host count follows conventional subnetting for /0 through /30 and point-to-point or single-host interpretations for /31 and /32. Actual routing and address policy depend on the network.
Results display up to 8 decimal places; exported numbers preserve calculation precision. This is a calculation summary, not an official certificate.