
Subnet Calculator
Use this IPv4 subnet calculator to find CIDR blocks, masks and usable address ranges. Check overlaps, preview smaller subnets and compare standard AWS address counts—all in your browser.
See the network boundary
The entered address in binary: blue network bits, remaining host bits.
—
Enable JavaScript to calculate your network.
- Network address
- —
- Subnet mask
- —
- Wildcard mask
- —
- Broadcast address
- —
- Usable range
- —
- Full block range
- —
Do these CIDR blocks overlap?
Calculate the primary network first.
Checks address intervals only. It does not inspect routes, live networks or cloud allocations.
Split into equal subnets
| Child subnet | Usable endpoints |
|---|---|
| Calculate a network to preview. | |
How to use this IPv4 subnet calculator
Enter an IPv4 address with a CIDR prefix, such as 192.168.1.42/24, and select Calculate subnet. You will get the network address, subnet mask, wildcard mask, full address interval and a usable range under the selected rules. You can also enter the address alone and supply a prefix or contiguous dotted-decimal mask separately.
The example becomes 192.168.1.0/24: 256 total addresses, with 254 conventional host addresses from 192.168.1.1 through 192.168.1.254. Clearing host bits is intentional; a host address and its containing network are not the same notation.
Use the overlap checker before proposing another address block. It distinguishes identical blocks, containment and disjoint intervals. For correctly aligned CIDR blocks, any overlap means one block contains the other. The checker compares with the primary result, not with your whole infrastructure. It cannot detect an allocation you have not entered.
The equal-subnet preview shows at most 16 rows, even for a very large split. Its total count still describes the complete split. Export copies the primary network calculation; it does not export an exhaustive subnet plan. For scheduling network maintenance, our crontab generator is a separate utility.
CIDR calculator method and limitations
An IPv4 address contains 32 bits. A prefix length p leaves 32 − p host bits. The calculator uses exact integer arithmetic over the IPv4 interval, without creating an array of every address.
total addresses = 2^(32 − prefix)
network = floor(address integer / total) × total
last address = network + total − 1
subnet mask integer = 2^32 − total
wildcard mask integer = total − 1
For conventional prefixes through /30, the host-count estimate excludes the network and directed-broadcast addresses. A /0 calculation spans all IPv4 addresses mathematically; it is not a promise of billions of assignable hosts. Special-purpose ranges, existing allocations, routers, DHCP policy and service reservations can make the real assignable set smaller. This tool deliberately does not classify everything outside private space as publicly routable.
Only contiguous subnet masks are accepted. For example, 255.255.255.0 is /24, while 255.0.255.0 is not a valid contiguous CIDR mask. Leading-zero octets, IPv6, hostnames, negative numbers and incomplete addresses are rejected. No address is scanned or resolved.
Why /31 and /32 need different rules
A /31 contains two addresses. On an IPv4 point-to-point link using RFC 3021, both can serve as endpoints; there is no directed-broadcast address for that link. That does not make /31 a general-purpose two-host LAN configuration. Confirm support on both endpoints.
A /32 identifies one address, commonly used as a host route. This calculator returns that address as both ends of the range and shows no broadcast address. Neither edge case is calculated by blindly subtracting two and returning zero or a negative count.
AWS subnet calculator mode
Standard AWS IPv4 subnets accept /16 through /28. This mode subtracts five addresses: offsets 0, 1, 2 and 3, plus the last address. A /24 therefore has 251 addresses under these standard allocation rules, with the displayed range beginning at offset 4. AWS does not support broadcast traffic in a VPC.
This mode excludes the BYOIP exception described in AWS documentation. It also does not validate VPC containment, organization policy, service-specific reservations or current IP usage. A number labelled “AWS usable” is an address-count calculation, not approval to deploy a subnet. Child previews apply the selected reservation rule to each child independently.
Common subnet mask and CIDR examples
| CIDR | Mask | Total | Conventional hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /26 | 255.255.255.192 | 64 | 62 |
| /28 | 255.255.255.240 | 16 | 14 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 point-to-point endpoints |
| /32 | 255.255.255.255 | 1 | 1 host-route address |
Splitting 10.0.0.0/24 into /26 blocks produces 10.0.0.0/26, 10.0.0.64/26, 10.0.0.128/26 and 10.0.0.192/26. They are adjacent and disjoint. By contrast, 10.0.0.0/25 contains the first two of those blocks.
Address planning is not firewall configuration. After verifying your actual interfaces and routes, consult our UFW firewall guide for filtering decisions and SSH client configuration guide for connecting to known hosts. Do not apply a broad allow rule simply because the calculator returns a range.
Frequently asked questions
Is this an IPv6 subnet calculator?
No. This version calculates IPv4 only. IPv6 has different address sizes and no broadcast address; applying this tool’s IPv4 host-count rules to IPv6 would be wrong.
Which wins: the prefix field or the slash in the address?
A slash suffix wins. Remove it to use the separate prefix or mask field. The canonical network result makes the effective prefix visible.
Does a subnet overlap mean a connection will fail?
Not necessarily. It is an arithmetic planning warning, not a routing diagnosis. Overlapping address space can cause ambiguity in connected networks; isolated networks may intentionally reuse addresses.
Is a wildcard mask the same as a subnet mask?
No. For this CIDR calculator it is the 32-bit inverse of the subnet mask. A /24 has mask 255.255.255.0 and wildcard 0.0.0.255. Device-specific ACL semantics must still be checked.
Are my network inputs uploaded?
The calculator runs locally and does not submit or persist the input values. The website’s normal ads and analytics remain active. Avoid entering sensitive infrastructure information on shared devices.
Sources and verification
Rules and references checked 26 October 2026. Automated arithmetic tests and browser checks are recorded with this release; no live network scan or AWS deployment is claimed.




