Loading…
Loading…
Enter IP/CIDR, get network address, broadcast, host range, and masks
Subnet Details
Run your projects on Claude Code?
We packaged the .claude config that runs this site — 26 specialist agents, 14 workflow skills, and 6 rule files from 31 real production incidents. From $9.
Get the Claude Code Production Pack — $29Subnet calculations are a daily task for network engineers, cloud architects, and DevOps engineers configuring VPCs, security groups, and firewall rules. Getting the network address, broadcast address, or host range wrong in a cloud security group can expose infrastructure or block valid traffic. This tool computes all subnet properties from a single IP/CIDR input with no room for arithmetic errors.
The input IP is parsed into a 32-bit unsigned integer by splitting on dots and bit-shifting each octet into position. The subnet mask is derived from the CIDR prefix by setting the top N bits to 1 and the remaining bits to 0 using a left-shift and fill operation.
Network address = IP & mask (bitwise AND). Broadcast address = IP | ~mask (bitwise OR with the inverted mask). First usable host = network + 1. Last usable host = broadcast − 1. Total hosts = 2^(32−prefix). Usable hosts = total − 2. Binary representation converts each of the four octets to an 8-character zero-padded binary string separated by dots.
A cloud engineer configuring an AWS VPC CIDR block verifies that 10.0.0.0/20 provides enough host addresses for 4,000 EC2 instances before committing to the design.
A network engineer writing Cisco ACL rules calculates the wildcard mask for a /26 subnet to correctly scope the permit statement.
A DevOps engineer double-checks that two proposed subnets (10.0.1.0/24 and 10.0.2.0/24) do not overlap before peering two VPCs.
Enter an IPv4 address in dotted-decimal notation (e.g. 192.168.1.50)
Select or type the CIDR prefix length (e.g. /24)
View network address, broadcast, host range, and masks instantly
Toggle binary view to see the full 32-bit binary representation
About the Subnet Calculator
CIDR (Classless Inter-Domain Routing) uses a /prefix-length suffix to define subnet size. /24 means the first 24 bits are the network prefix, leaving 8 host bits — allowing 254 usable hosts.
254 usable hosts. The formula is 2^(32−prefix) − 2, subtracting the network address and broadcast address. A /24 gives 2^8 − 2 = 254.
The bitwise inverse of the subnet mask. Used in Cisco ACLs and OSPF configurations. For a /24 subnet mask of 255.255.255.0, the wildcard mask is 0.0.0.255.
This calculator covers IPv4 only. IPv6 subnetting uses 128-bit addresses and a different host-count scale — a dedicated IPv6 tool handles those calculations accurately.
Builder/critic agent prompts with brakes built in
Open →DeveloperFormat, validate & diff JSON — runs entirely in browser
Open →DeveloperTest regex live — railroad diagrams + plain English explained
Open →DeveloperOne color in, full design system out
Open →