CIDR / IP Converter
Calculate subnet ranges and host capacity from IPv4 CIDR notation.
Range details
About this tool
This CIDR calculator takes an IPv4 network address in CIDR notation (e.g., 10.0.0.0/24) and computes the complete subnet details: network address, subnet mask, first usable host, last usable host, broadcast address, and total usable host count. It is the essential tool for network engineers, security teams, and cloud architects who need to quickly verify subnet boundaries, plan address allocations, and validate firewall rules.
Real example
Input: 10.0.0.0/24
The /24 prefix means 24 bits are the network portion, leaving 8 host bits (2⁸ = 256 addresses):
Network: 10.0.0.0
Mask: 255.255.255.0
First usable host: 10.0.0.1
Last usable host: 10.0.0.254
Broadcast: 10.0.0.255
Usable hosts: 254 (256 minus network and broadcast addresses)
Common cloud VPC default: 172.31.0.0/16 gives you 65,534 usable hosts across a single subnet - suitable for splitting into smaller /24 or /20 subnets per availability zone.
Common use cases
- Cloud VPC subnet planning: AWS, GCP, and Azure require you to specify CIDR blocks when creating VPCs and subnets. Calculate the right size before provisioning - you cannot shrink a CIDR block after creation.
- Firewall and security group rules: Verify whether a given IP falls within the intended CIDR block before writing the rule. Check if two CIDR blocks overlap using the first/last host ranges.
- VPN and site-to-site routing: Confirm that remote subnets do not overlap with your local network before configuring a VPN tunnel. Overlapping CIDR blocks cause routing failures that are difficult to diagnose.
- Network segmentation design: When dividing a /16 into department-level /24s, use this tool to enumerate each subnet's range and confirm no two overlap. Combine with IP to Binary to visualize the host/network bit boundary.
How it works
The CIDR prefix length determines the subnet mask: a /24 produces a mask of 24 consecutive ones in binary (11111111.11111111.11111111.00000000 = 255.255.255.0). The network address is computed by ANDing the input IP with the mask. The broadcast is computed by ORing the network address with the inverted mask. First host is network + 1, last host is broadcast - 1. Usable hosts = 2^(32−prefix) − 2 for prefix lengths 0-30; /31 and /32 are point-to-point special cases.
Common mistakes
- /32 is a single host, not a range: A /32 CIDR block (e.g., 10.0.0.1/32) refers to exactly one IP address. It has no usable host range - both first and last host are the same address. It is valid for firewall rules targeting a single IP.
- Off-by-one in host count: A /24 has 256 total addresses but only 254 usable hosts. The network address (x.x.x.0) and broadcast (x.x.x.255) are reserved and cannot be assigned to hosts.
- Using a host IP instead of the network address: CIDR notation should use the network address, not a host address. 10.0.0.5/24 is technically equivalent to 10.0.0.0/24 but is sloppy notation. Always use the network address as the base.
FAQ
Does this support IPv6
No, this version focuses on IPv4 CIDR. IPv6 subnetting works on the same prefix-length principle but across 128 bits instead of 32.
How many hosts does a /28 give me
A /28 leaves 4 host bits: 2⁴ = 16 total addresses, 14 usable hosts. /28 subnets are common for small server segments and point-of-presence clusters.
What CIDR block should I use for a cloud subnet with ~500 hosts
A /23 gives 510 usable hosts (2⁹ − 2 = 510), which just covers 500. A /22 gives 1,022 - more headroom if you expect growth.
Can two CIDR blocks overlap
Yes, and overlapping blocks cause serious routing problems. To check for overlap, compare the first/last host ranges of both blocks. If the ranges intersect at any point, they overlap.
Related tools
- IP to Binary — visualize subnet masks in raw binary to confirm host bit boundaries
- Binary to IP — convert binary subnet masks back to dotted-decimal notation
- WHOIS Lookup — look up ownership and ASN for an IP block inside your CIDR range
- IP Lookup — geolocate specific IPs within the subnet you are planning
- Hostname to IP — resolve hostnames to IPs before adding them to firewall allowlists