Subnet Calculator

Enter an IPv4 address with a CIDR prefix or a subnet mask and get the network address, broadcast address, usable range, host count, wildcard mask and the binary breakdown. Everything is computed in your browser.

Network address
Broadcast address
First usable host
Last usable host
Usable hosts
Total addresses
Subnet mask
Wildcard mask
CIDR
Address class
Type
Integer value

How the calculator works

An IPv4 address is 32 bits. The prefix length says how many of those bits identify the network; the rest identify hosts within it. The calculator converts your address and prefix to binary, applies the mask with a bitwise AND to find the network address, fills the host bits with ones to find the broadcast address, and counts the addresses in between. Enter a mask such as 255.255.255.192 instead of a prefix and it converts it for you.

Common prefixes at a glance

PrefixMaskTotalUsableTypical use
/8255.0.0.016,777,21616,777,214The whole 10.0.0.0 private range
/16255.255.0.065,53665,534A large campus or the whole 192.168 range
/24255.255.255.0256254A home or small-office LAN
/25255.255.255.128128126Half of a /24
/26255.255.255.1926462A quarter of a /24
/27255.255.255.2243230A small VLAN
/28255.255.255.2401614A handful of servers
/30255.255.255.25242Router-to-router link
/31255.255.255.25422Point-to-point link (RFC 3021)
/32255.255.255.25511A single host route

Background on private ranges and special addresses is on the IP addresses page. To find the address of the router that hands out your subnet, see how to find your router IP.

Frequently asked questions

What does /24 mean?
It is CIDR notation for a 24-bit network prefix, equivalent to the mask 255.255.255.0. The remaining 8 bits address hosts, giving 256 addresses of which 254 are usable.
Why are two addresses unusable?
The first address in a block is the network address and the last is the broadcast address. Neither can be assigned to a device, so usable hosts equal 2 to the power of the host bits, minus 2. The exceptions are /31 (both addresses usable on point-to-point links) and /32 (a single host).
What is a wildcard mask?
The inverse of the subnet mask, used in Cisco access lists. A mask of 255.255.255.0 has the wildcard 0.0.0.255.
How do I split a network into subnets?
Increase the prefix length. Each extra bit halves the block: a /24 becomes two /25s, four /26s, eight /27s. Enter any address in the new range with the new prefix to see its boundaries.
Does this send my input anywhere?
No. The calculation runs in your browser with JavaScript. Nothing is transmitted or stored.
Scroll to Top