CIDR / Subnet Calculator
Test & DebugCalculate network/broadcast addresses, host range, and mask from a CIDR block
Subnet details
192.168.1.0/24
192.168.1.0
192.168.1.255
255.255.255.0
0.0.0.255
192.168.1.1
192.168.1.254
254
256
C
11000000.10101000.00000001.00001010
11111111.11111111.11111111.00000000
About the CIDR / Subnet Calculator
An IPv4 CIDR and subnet calculator. Enter an address with a prefix or subnet mask and get the network address, broadcast address, subnet and wildcard masks, usable host range, total address count, and binary representation — all computed locally.
Useful for planning a subnet split before configuring a router or firewall, sanity-checking a /24 you inherited from a legacy network diagram, or translating between CIDR notation and the dotted subnet mask an older device's config screen still expects.
How to Use the CIDR / Subnet Calculator
Enter an address in CIDR notation, or an IP plus a dotted subnet mask.
Review the computed network/broadcast addresses, masks, and usable host range.
Check the binary representation for a bit-level view of the split.
Frequently Asked Questions
What input formats does it accept?
CIDR notation (192.168.1.10/24), an IP address plus a dotted subnet mask (192.168.1.10 255.255.255.0), or a bare IP address (treated as a /32, a single host).
Why do /31 and /32 show different usable host counts than the normal formula?
The usual "total addresses minus 2" rule assumes a separate network and broadcast address. A /32 is a single address with no separate network/broadcast, so it has 1 usable host. A /31 is a point-to-point link (RFC 3021) where both addresses are usable with no broadcast address reserved, so it has 2.
What is the wildcard mask, and how is it different from the subnet mask?
The wildcard mask is the bitwise inverse of the subnet mask — it's the format Cisco access control lists and OSPF configuration expect instead of a regular subnet mask (e.g. 0.0.0.255 instead of 255.255.255.0 for a /24).
Is this only for IPv4?
Yes, currently only IPv4 — IPv6 prefix calculations work differently and aren't covered here.
How do I find the number of usable hosts for a given prefix?
The tool computes it for you automatically — enter any prefix length and the "usable host range" and total count update instantly, so there's no need to memorize the 2^(32-prefix) formula.