Subnet Calculator
Enter an IPv4 address with CIDR or dotted mask and get network, broadcast, wildcard and host range.
Network address
Broadcast address
Subnet mask
Wildcard mask
Prefix length
Usable hosts
First usable IP
Last usable IP
Class / Address type
How to use it
- Type an IPv4 address followed by
/and either a prefix (192.168.1.10/24) or a dotted mask (10.0.0.5/255.255.0.0). - The result cards fill in: network address, broadcast address, subnet mask, wildcard mask and prefix length.
- Read the usable host count and the first/last usable IP of the network.
- The last card shows the address class (A–E) and whether the address is private, loopback, multicast or public.
- Anything malformed — a bad octet, a prefix over 32, or a non-contiguous mask — shows a clear error instead of a wrong answer.
Common use cases
- Planning VLANs and subnets — checking network/broadcast bounds before assigning ranges.
- Writing firewall or router rules — getting the exact wildcard mask used by ACL syntax.
- Allocating IP ranges — seeing how many usable hosts a
/26or/28actually gives. - Studying for network exams — verifying hand-calculated subnet results.
Why it stays private
The whole calculation is integer bit operations inside your browser. There are no lookups and no submitted addresses.
FAQ
Q: Why does a /24 show 254 usable hosts instead of 256? A: The network address itself and the broadcast address cannot be assigned to hosts, so the count is 256 minus 2. The exception is /31 and /32, which follow RFC 3021 point-to-point and single-host conventions.
Q: What masks are rejected? A: Masks whose 1-bits are not contiguous from the left, such as 255.0.255.0. Such masks cannot be expressed as a prefix length and are reported as an error.
Q: What is the wildcard mask for? A: It is the inverse of the subnet mask and is used in many router ACL formats: a wildcard of 0.0.0.255 matches the last octet freely.
Your data stays on this device
Subnet Calculator runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.
Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.