Subnet Calculator
Type an address with its prefix or subnet mask to see its network, usable host range, masks, and address type, then optionally split it into equal smaller subnets.
Overview
CIDR notation such as 192.168.1.0/24 describes a block of addresses: the number after the slash says how many leading bits are the network part, and the remaining bits number the hosts inside it. Working out the first and last usable address, the broadcast address, or how many hosts fit is simple binary arithmetic, but it's easy to slip when you're planning a VPC, writing firewall rules, or configuring a router.
This calculator handles both IPv4 and IPv6. For IPv4 it also shows the dotted subnet mask, the wildcard mask used by Cisco ACLs and OSPF, and binary forms of the address and mask. It follows the special cases correctly: /31 point-to-point links use both addresses under RFC 3021, and /32 is a single host. For IPv6 it shows the compressed and fully expanded address forms and handles 128-bit arithmetic exactly.
Every address is classified: private (RFC 1918), carrier-grade NAT, loopback, link-local, documentation, multicast, unique local, or public. The split option divides a network into equal subnets, for example a /16 into /24s for each environment or availability zone.
Examples & Sample Data
A /26 from a dotted subnet mask
192.168.1.130 255.255.255.192
Network: 192.168.1.128/26 Broadcast: 192.168.1.191 Usable host range: 192.168.1.129 – 192.168.1.190 Usable hosts: 62 Wildcard mask: 0.0.0.63 Address type: Private (RFC 1918)
Splitting a /24 into four /26 subnets
10.20.0.0/24, split into /26
10.20.0.0/26 10.20.0.64/26 10.20.0.128/26 10.20.0.192/26
IPv6 network
2001:db8:abcd:12::1/64
Network: 2001:db8:abcd:12::/64 Last address: 2001:db8:abcd:12:ffff:ffff:ffff:ffff Total addresses: 18,446,744,073,709,551,616
How It Works
- Enter an IPv4 or IPv6 address with a prefix, like 10.0.0.25/22, or with a dotted subnet mask.
- Read the network address, broadcast, usable host range, masks, and address type. Results update as you type.
- To plan smaller networks, enter a longer prefix in Split into subnets, such as /26, to list every resulting subnet.
- Copy the subnet list straight into a firewall rule, Terraform variable, or IP plan.
Common Use Cases
Planning cloud networks
Check a VPC CIDR and carve it into per-subnet ranges before creating resources, so ranges don't overlap.
Writing firewall and ACL rules
Get the exact network address and wildcard mask for a router access list or security group rule.
Checking what an address is
Find out whether an IP is private, carrier-grade NAT, link-local, or public before troubleshooting connectivity.
Tips & Best Practices
- Cloud providers reserve some addresses in every subnet (AWS keeps five), so plan for fewer usable hosts than the math alone shows.
- An address like 10.0.0.25/24 isn't the network itself. The calculator shows the containing network, 10.0.0.0/24, which is what most configuration fields expect.
Frequently Asked Questions
No. All calculations run in your browser, so internal network ranges never leave your device.
The first address identifies the network and the last is the broadcast address, so neither can be assigned to a host. The exceptions are /31, where both addresses are usable on point-to-point links, and /32, a single host.
It's the inverse of the subnet mask: 0 bits must match and 1 bits can be anything. Cisco access lists and OSPF use it, so a /24 has the wildcard mask 0.0.0.255.
A single LAN is normally a /64, and sites typically receive a /48 or /56. A /48 splits into 65,536 /64 networks, so IPv6 plans usually allocate by nibble boundaries (/52, /56, /60) for readability.
Related Tools
Explore more high-performance utilities.