IP Subnet Calculator
Enter an IP address with a prefix such as /24 — or a netmask — to see the network, broadcast address, usable host range, masks and address type, for IPv4 and IPv6.
Result
Enter an IP address with a prefix or netmask.
How to use this tool
- Enter an address with a prefix (
192.168.1.10/24), with a netmask (192.168.1.10 255.255.255.0), or an IPv6 block (2001:db8::1/64). - Use the prefix buttons to try common sizes.
- More details shows the mask in binary and the address as hex and as an integer.
How it works
A /n prefix means the first n bits identify the network. The network address keeps those bits and sets the rest to 0; the broadcast address sets the rest to 1. A block holds 2^(32 − n) IPv4 addresses, of which all but the network and broadcast addresses are usable — except /31 point-to-point links (RFC 3021), where both are usable, and /32, a single host.
IPv6 blocks hold 2^(128 − n) addresses and have no broadcast address. IPv6 addresses are shown in the standard compressed form (RFC 5952).
Example
A home network
192.168.1.10/24 is in network 192.168.1.0/24: hosts 192.168.1.1 – 192.168.1.254 (254 usable), broadcast 192.168.1.255, netmask 255.255.255.0, a private address.
A point-to-point link
10.0.0.5 255.255.255.252 is 10.0.0.4/30 with 2 usable hosts: 10.0.0.5 and 10.0.0.6.
Privacy and limitations
- Everything runs in your browser; nothing you enter is uploaded or stored.
- Address types (private, loopback, documentation and so on) follow the IANA special-purpose address registries.
Frequently asked questions
How many hosts does a /24 have?
256 addresses, of which 254 can be given to devices.
What is a wildcard mask?
The inverse of the netmask (0.0.0.255 for /24), used in Cisco access lists and OSPF.