Ipv4 Subnet Calculator
Network documentation, cloud consoles, and firewall rules almost always describe networks in CIDR notation, yet the devices themselves ask for the pieces: the subnet mask, the network address, the broadcast address, and the usable host range. The IPv4 Subnet Calculator bridges that gap. Enter any network in CIDR notation and it instantly expands it into the full set of subnet details.
Why CIDR Notation Needs Expanding
CIDR notation is brilliant for writing, but most devices ask for the pieces separately. A router interface needs the IP address and the subnet mask. A firewall rule might need the network address and wildcard mask. A DHCP scope needs the first and last usable hosts. Doing those conversions by hand means binary math and powers of two, which is slow and error-prone. The calculator does it instantly and consistently, so your documentation always matches your configuration.
How to Use the IPv4 Subnet Calculator
The tool accepts the whole network in one field:
- Type the network in CIDR notation. Enter the address, a forward slash, and the prefix length, for example 10.0.0.0/16.
- Click Calculate. The panel shows the subnet mask, wildcard mask, network address, broadcast address, host range, and address counts.
- Copy what you need. Use the mask for interface configuration, the wildcard for access lists, and the host range for DHCP scopes.
- Double-check the boundaries. Confirm the first and last usable hosts before assigning them to devices.
- Reset for the next network. The Reset button clears the field for another CIDR input.
Worked Example: 10.0.0.0/16
Type 10.0.0.0/16 into the field and click Calculate.
A /16 prefix means 16 network bits and 16 host bits. The subnet mask is 255.255.0.0 and the wildcard mask is 0.0.255.255. The network address is 10.0.0.0 and the broadcast address is 10.0.255.255.
The calculator reports:
- Subnet mask: 255.255.0.0
- Wildcard mask: 0.0.255.255
- Network address: 10.0.0.0
- Broadcast address: 10.0.255.255
- First usable host: 10.0.0.1
- Last usable host: 10.0.255.254
- Total addresses: 65536
- Usable hosts: 65534
This is the classic large private block. Many companies take 10.0.0.0/8 or a /16 slice of it and carve it into smaller subnets for each site or department.
More Helpful Information
Reading CIDR at a glance
With practice, common prefixes become second nature. The mask for /8 is 255.0.0.0, for /16 is 255.255.0.0, and for /24 is 255.255.255.0. Each additional bit doubles the number of networks and halves the hosts per network.
Where each value gets used
The subnet mask goes on router and server interfaces alongside the IP address. The wildcard mask appears in Cisco access lists and OSPF network statements. The network and broadcast addresses define the boundaries that must never be assigned to hosts.
Mistakes to avoid
The most damaging mistake is a typo in the prefix: 10.0.0.0/16 and 10.0.0.0/24 describe wildly different networks. Always double-check the prefix length before applying configuration, especially when copying from documentation.
Planning with supernets
CIDR notation also describes supernets, which summarize several subnets into one entry. Four /24 networks can be summarized as a single /22, which keeps routing tables small and manageable.
Frequently Asked Questions
Q1: What is CIDR notation?
A: CIDR notation combines an IP address with a prefix length, such as 192.168.1.0/24, to describe a network and its size in a compact form.
Q2: How do I convert a prefix length to a subnet mask?
A: Set the first N bits to one and the rest to zero, then write the 32-bit value in dotted decimal. A /24 becomes 255.255.255.0.
Q3: What is the difference between a subnet mask and a wildcard mask?
A: The subnet mask identifies the network portion, while the wildcard mask is its inverse, used in access lists to specify which bits to ignore.
Q4: How many addresses are in a /22 network?
A: A /22 has 10 host bits, giving 1024 total addresses and 1022 usable hosts after reserving network and broadcast.
Q5: Can I enter a host address instead of the network address?
A: Yes. The calculator masks the input to find the network address, so 192.168.1.100/24 correctly yields network 192.168.1.0.
Q6: What does 0.0.0.0/0 mean?
A: It is the default route, matching every IPv4 address. It is used for the gateway of last resort that handles traffic with no more specific route.
Q7: How do I find the broadcast address of a subnet?
A: Set all host bits to one. For 192.168.1.0/24, the broadcast is 192.168.1.255.
Q8: Why is the first usable host usually the gateway?
A: It is a convention, not a requirement. Using the first usable address for the router makes documentation consistent and troubleshooting easier.
Q9: What prefix gives me about 500 usable hosts?
A: A /23 provides 510 usable hosts, which is the smallest prefix that covers 500.
Q10: Can CIDR notation describe IPv6 networks?
A: Yes, IPv6 uses the same slash notation, such as 2001:db8::/32, though the address math uses 128 bits instead of 32.
Q11: What happens if I mistype the prefix?
A: You describe a completely different network. A /16 instead of /24 changes the size by a factor of 256, so always verify before configuring.
Q12: How are subnets summarized?
A: Adjacent subnets that align on a bit boundary can be combined into a shorter prefix. Four /24s that align become one /22.
Q13: Should the broadcast address go in a DHCP pool?
A: Never. The broadcast address is reserved. DHCP pools should run from the first usable host to the last usable host only.
Q14: What is the smallest usable subnet?
A: A /31 holds exactly 2 addresses with no reserved network or broadcast, used for point-to-point links. A /32 is a single host route.
Q15: How do I document a subnet properly?
A: Record the CIDR notation, the network and broadcast addresses, the usable range, and the gateway. This prevents confusion during troubleshooting.
Conclusion
CIDR notation is the shorthand of modern networking, but real configuration work needs the expanded details. Enter any CIDR network above and get the complete subnet profile instantly.