Subnet calculator
Work out the network, broadcast, usable range, mask, wildcard and host count for any IPv4 or IPv6 CIDR, and check which IPs fall inside it.
Runs in your browser. Nothing you paste is uploaded, stored or logged.
Try:
- Network
- 10.0.0.0/15
- Subnet mask
- 255.254.0.0
- Wildcard mask
- 0.1.255.255
- First usable
- 10.0.0.1
- Last usable
- 10.1.255.254
- Broadcast
- 10.1.255.255
- Usable hosts
- 131,070
- Total addresses
- 131,072
- Binary mask
- 11111111.11111110.00000000.00000000
- Address type
- Private (RFC 1918)
- Previous range
- 9.254.0.0/15
- Next range
- 10.2.0.0/15
How it works
Enter an address with a prefix length (192.168.10.37/27), with a dotted mask (10.0.0.0 255.255.248.0) or an IPv6 prefix. The calculator shows the network and broadcast addresses, the usable range, the subnet and wildcard masks, the number of hosts, the mask in binary and the neighbouring ranges, and says whether the range is private, public, CGNAT, documentation or another special block.
Reference pages for every IPv4 prefix length:
Questions
How many usable hosts are in a subnet?
A subnet with prefix length n has 2^(32 − n) addresses. Two are reserved, the network and broadcast addresses, so a /24 has 256 addresses and 254 usable hosts. The exceptions are /31, where both addresses are usable on point-to-point links (RFC 3021), and /32, a single host.
What is a wildcard mask?
The inverse of the subnet mask: 0 bits must match and 1 bits can be anything. Cisco access lists and OSPF use wildcard masks, so a /24 mask of 255.255.255.0 is written 0.0.0.255.
How do I check whether an IP is in a range?
Enter the range, then paste IP addresses into “Check IPs against this range”. Each is marked inside or outside, which helps when reviewing firewall rules and allow-lists, or checking whether a suspicious IP belongs to a provider’s published range.
Does it work with IPv6?
Yes. Enter an IPv6 address with a prefix such as 2001:db8::/48 to see the network in short and expanded form, the last address, the total number of addresses and how many /64 networks it contains.