Divide an IPv4 or IPv6 network into equal smaller subnets
Subnet Calculator
Get every number for an IPv4 subnet, exactly, from one address and prefix.
Loading tool…
How to use subnet calculator
Type an address with a prefix, such as 192.168.10.37/26, or with a dotted mask.
Drag the prefix slider to compare sizes.
Read the network, broadcast, masks, host range and counts, and copy any value.
What this tool does
- Accepts /prefix, dotted netmasks and bare addresses, and recognises a wildcard mask typed by mistake.
- Handles /31 point-to-point links (RFC 3021) and /32 host routes correctly.
- Labels private, loopback, link-local, CGNAT, documentation and multicast ranges.
- Shows the address, mask, network and broadcast in binary with network bits highlighted.
How the result is verified
All maths uses exact integer arithmetic, and results were compared with Python's ipaddress module on hundreds of random networks during development.
Frequently asked questions
How many usable hosts are in a /24?
254. A /24 has 256 addresses; the first is the network address and the last is the broadcast address, so neither can be given to a host.
What is a wildcard mask?
The inverse of the netmask, used by Cisco access lists and OSPF. For 255.255.255.0 it is 0.0.0.255.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
The smallest set of CIDR blocks that covers an address range
Compress, expand and analyse IPv6 addresses and prefixes
IPv4 as integer, hex, binary and IPv4-mapped IPv6, in both directions