What is a subnet calculator?
A subnet calculator works out the details of an IPv4 network from an address and prefix length. Network engineers, system administrators and students use it to plan address ranges, configure routers and firewalls, and check that two devices are on the same network.
Enter an address with a prefix or dotted subnet mask to get the network in CIDR notation, the first and last usable host and how many there are, the broadcast address, subnet and wildcard masks, total addresses, address class and type. A table shows the address, mask, network and broadcast in binary, which makes the arithmetic visible.
How to use the Subnet calculator
1.Enter an address
Like 192.168.10.77, or paste CIDR notation such as 10.0.0.0/8.
2.Enter the prefix or mask
/26, 26 or 255.255.255.192 all work.
3.Read the results
Network, hosts, broadcast, masks and the binary breakdown.
Example: 192.168.10.77/26
A device on a small office network:
- Network
- 192.168.10.64/26
- Usable hosts
- 62: 192.168.10.65 – 192.168.10.126
- Broadcast
- 192.168.10.127
- Mask / wildcard
- 255.255.255.192 / 0.0.0.63
Any device from .65 to .126 is on the same network without a router in between.
How a subnet is worked out
The prefix says how many leading bits identify the network; the rest number the hosts. A /26 leaves 6 host bits, so the block holds 2⁶ = 64 addresses. The network address has all host bits set to 0, the broadcast address all set to 1, and the usable hosts sit between them.
Two prefixes are special. A /31 is used for point-to-point links and both of its addresses are usable, as RFC 3021 allows; a /32 is a single host. The address type shows whether it's private, public, loopback, link-local, carrier-grade NAT or reserved for documentation.
Frequently asked questions
What is a wildcard mask?
The mask inverted: 0.0.0.63 for a /26. Cisco access lists and OSPF use it.
Why are there 2 fewer usable hosts than addresses?
The first address names the network and the last is the broadcast address, so neither can be given to a device.
Can I enter a mask like 255.255.0.255?
No. Subnet masks must be ones followed by zeros, so that mask is invalid.
Does it support IPv6?
Use the IPv6 calculator for IPv6 prefixes.
Related tools
Subnet splitter
Divide a CIDR block into smaller subnets by count, hosts or prefix.
IP range to CIDR
Convert an IPv4 address range to the fewest CIDR blocks, or expand CIDR to a range.
IP address converter
Convert IPv4 addresses between dotted, integer, hex, binary and IPv6 forms.
IPv6 calculator
Expand, compress and classify IPv6 addresses and work out prefix ranges.
chmod calculator
Convert Unix file permissions between octal like 755 and symbolic like rwxr-xr-x.
JSON Formatter & Validator
Pretty-print, minify, sort and validate JSON with line-numbered errors.
More Developer tools
JSON & data
CSV tools
Web & API
Git & releases
Encoding & security
- Base64 encode & decode
- URL encode & decode
- JWT decoder
- Hash generator
- HTML entity encoder
- Text to binary
- Morse code translator
- Caesar cipher & ROT13
- Random string generator
- Secret key generator
- 2FA code generator (TOTP)
- Encrypt & decrypt text
- Encrypt & decrypt files
- SSH key generator
- Base32 encoder and decoder
- Unicode escape converter
- Nano ID generator
- JWT generator
Text & code
- Regex tester
- Text diff checker
- Cron expression explainer
- Lorem ipsum generator
- Markdown previewer
- Slug generator
- Strip HTML tags
- Unicode character inspector
- URL parser
- Markdown TOC generator
- cURL converter
- Whitespace visualizer
- Markdown link extractor
- Regex escape
- Regex match extractor
- Split text by regex
- HTML, CSS and JS playground
- Mock data generator
- Keyboard event tester
- ASCII table