IP Subnet Calculator
Calculate IPv4 subnet details instantly. Enter an IP + CIDR to get network address, broadcast, first/last usable host, subnet mask, wildcard mask, and host count. Free, browser-side, no signup.
How to Use
- Type an IP address with CIDR notation in the input field (e.g.
192.168.1.0/24), or enter just an IP address and choose the prefix length from the dropdown. - Results appear instantly: network address, broadcast address, subnet mask, wildcard mask, first and last usable host, and total usable host count.
- Click Copy to copy all results to your clipboard as plain text.
Output Fields Explained
| Field | Description |
|---|---|
| Network Address | First address of the subnet — identifies the network itself |
| Broadcast Address | Last address — sent to all hosts in the subnet |
| Subnet Mask | Dotted-decimal form of the prefix (e.g. 255.255.255.0) |
| Wildcard Mask | Bitwise inverse of the subnet mask |
| First Usable Host | Network address + 1 |
| Last Usable Host | Broadcast address − 1 |
| Usable Hosts | Total addresses minus 2 (network + broadcast) |
| CIDR Notation | Canonical network/prefix form |
Common Subnet Reference
| CIDR | Subnet Mask | Usable Hosts |
|---|---|---|
| /30 | 255.255.255.252 | 2 |
| /29 | 255.255.255.248 | 6 |
| /28 | 255.255.255.240 | 14 |
| /27 | 255.255.255.224 | 30 |
| /26 | 255.255.255.192 | 62 |
| /25 | 255.255.255.128 | 126 |
| /24 | 255.255.255.0 | 254 |
| /23 | 255.255.254.0 | 510 |
| /22 | 255.255.252.0 | 1,022 |
| /16 | 255.255.0.0 | 65,534 |
Common Use Cases
- Network design and VLAN planning
- Verifying firewall and ACL rules
- Troubleshooting routing issues
- Cloud VPC and security-group configuration (AWS, GCP, Azure)
- OSPF and BGP prefix calculations
FAQ
What is a subnet?
A subnet (subnetwork) is a logical subdivision of an IP network. Subnetting divides a large network into smaller, more manageable segments, improving performance and security.
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its associated prefix length together, e.g. 192.168.1.0/24. The number after the slash is the prefix length — the count of bits reserved for the network portion.
How is the subnet mask calculated?
The subnet mask is derived from the prefix length by setting the first N bits to 1 and the rest to 0. For /24 that gives 255.255.255.0 (24 ones followed by 8 zeros).
What is the wildcard mask?
The wildcard mask is the bitwise inverse of the subnet mask. It is used in ACLs and routing protocols (e.g. OSPF) to specify which bits of an address are significant.
How many usable hosts does a /24 have?
A /24 subnet has 256 total addresses. Two are reserved — one for the network address and one for the broadcast address — leaving 254 usable host addresses.
Is any data sent to a server?
No. All calculations are performed locally in your browser using pure JavaScript bit operations. Nothing is transmitted.