What is the CIDR Subnet Calculator?
CIDR (Classless Inter-Domain Routing) notation compresses an IP address and its routing prefix into a single string (e.g. 192.168.1.0/24). This tool decodes every field of a CIDR block using bitwise arithmetic.
How it Works under the hood
For IPv4, the prefix length determines the subnet mask via left-bit-shift operations. The network address is obtained by ANDing the IP with the mask; the broadcast by ORing with the inverted mask. All IPs in the block are enumerated using BigInt arithmetic to avoid JavaScript 32-bit integer overflow. Large subnets (>/24) show previews of the first and last 50 hosts to prevent browser memory issues.
SysAdmin & Security Use Cases
- »Plan IP allocation for VPC / cloud network design.
- »Verify firewall ACL ranges cover the intended hosts.
- »Cross-check CIDR blocks in route tables and BGP announcements.
- »List all usable IPs in a small subnet for inventory or scanning.