Skip to content

IP Subnet Calculator

Calculate network address, broadcast, subnet mask, and host range from IP/CIDR

Do the subnet math without the headaches

You’re setting up a VPC in AWS and need to figure out how many hosts fit in a /28. Or you’re configuring a firewall rule and need the network address and broadcast for 10.0.5.0/24. Or someone asked “what’s the wildcard mask for a /22” and you’d rather not do binary math in your head.

Type in the IP address and CIDR prefix, and the calculator gives you everything: network address, broadcast address, first and last usable host, total hosts, subnet mask, wildcard mask, IP class, and whether it’s a private (RFC 1918) address. Common presets for /8, /16, /24, and /28 are one click away.

What the numbers mean

Network address: the first address in the range, identifies the subnet itself. Can’t assign it to a device.

Broadcast address: the last address, used to send traffic to every host in the subnet. Also reserved.

Usable hosts: everything between those two. A /24 has 256 total addresses but only 254 usable. A /28 has 16 total, 14 usable.

Subnet mask: 255.255.255.0 for a /24. Tells routers which bits are network and which are host.

Wildcard mask: the inverse. 0.0.0.255 for a /24. Cisco ACLs and OSPF use these. Annoyingly, it’s always the opposite of what you’d expect.

The subnets you’ll see everywhere

/32: a single host. Used for host routes and loopback addresses. /30: 4 addresses, 2 usable. Point-to-point links between routers. /28: 16 addresses, 14 usable. Small server groups, DMZ segments. /24: 256 addresses, 254 usable. The standard LAN subnet. If someone says “a /24” without context, they probably mean a 254-host network. /16: 65,536 addresses. Cloud VPCs, larger corporate networks. /8: 16.7 million addresses. 10.0.0.0/8 is the big private range.

The Number Base Converter can help if you want to see the binary behind subnet masks.

FAQ

What’s CIDR notation?

A /24 means the first 24 bits of the address are the network portion. The remaining 8 bits (32 - 24) are for hosts. 2^8 = 256 total addresses, minus 2 reserved = 254 usable.

Subnet mask vs wildcard mask?

Subnet mask: network bits are 1, host bits are 0. Wildcard mask: the exact opposite. If your subnet mask is 255.255.255.0, the wildcard is 0.0.0.255. Wildcard masks show up in Cisco ACLs and routing configs.

Why only 254 usable hosts in a /24?

Two addresses are always reserved: the network address (first) and the broadcast address (last). 256 - 2 = 254.

IPv6?

This calculator is IPv4 only. IPv6 subnetting uses similar concepts but with 128-bit addresses.

Client-side?

Yes, no IP addresses leave your browser.

ip subnet cidr network calculator

Related Tools

More in Developer Tools