Subnet Calculator
Calculate mask, IP range, host count by CIDR notation.
IPv4 subnet calculator: mask, network, broadcast and hosts
Enter an IP address with a prefix, such as 192.168.10.77/26, or just an IP (then /24 is assumed). The calculator finds the network and broadcast addresses, first and last host, host count, subnet mask and wildcard mask, shows the mask and address in binary and marks RFC 1918 private ranges. IPv4 only.
How to Use
- Enter an IP address with a prefix, e.g. 192.168.10.77/26
- Without a prefix the calculator assumes /24
- Read the mask, network address, broadcast and host range
Use Cases
- Plan subnet segmentation for infrastructure and environments.
- Prepare firewall and ACL rules based on IP ranges.
Limitations
- Focused on IPv4 CIDR calculations.
- Does not analyze real BGP routes or host reachability.
Example Input / Output
192.168.10.0/26
Mask 255.255.255.192, Host range 192.168.10.1-62, Broadcast 192.168.10.63.
FAQ
How to use the subnet calculator
Enter an IPv4 address with a prefix, for example 192.168.10.77/26. The address does not have to be the start of the network: the calculator finds the network it belongs to. Leave the prefix out and it assumes /24 (255.255.255.0). The calculator handles IPv4 only.
What each field means
- Subnet mask is the prefix length written in dotted decimal:
/26=255.255.255.192. - Wildcard mask is the inverted mask (
0.0.0.63for a /26), used in Cisco access lists and OSPF configuration. - Network address is the first address of the block and names the subnet itself. It is not assigned to a device.
- Broadcast is the last address of the block. Not for devices either.
- First and last host give the range you can assign to devices.
- Number of hosts is 2(32 − prefix) − 2. /31 and /32 follow different rules, see below.
- Class shows “Private” for the RFC 1918 ranges (
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16). Everything else is labelled “Public”, including127.0.0.0/8(localhost) and100.64.0.0/10(carrier-grade NAT), even though neither is reachable from the internet. - Binary mask and address: ones in the mask are the network part, zeros are the host part.
Worked example: 192.168.10.77/26
| Mask | 255.255.255.192 |
| Wildcard | 0.0.0.63 |
| Network | 192.168.10.64 |
| Broadcast | 192.168.10.127 |
| Hosts | 192.168.10.65 – 192.168.10.126, 62 in total |
The mental shortcut: the last non-zero octet of the mask is 192, so the block size is 256 − 192 = 64. Blocks start at 0, 64, 128 and 192. Address .77 falls into 64–127. The first address is the network, the last is the broadcast, and everything in between is usable.
Subnet mask cheat sheet
| Prefix | Mask | Hosts | Typical use |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 | The whole 10.0.0.0 network |
| /16 | 255.255.0.0 | 65,534 | Large corporate network, cloud VPC |
| /22 | 255.255.252.0 | 1,022 | Campus, guest Wi-Fi |
| /23 | 255.255.254.0 | 510 | Office floor |
| /24 | 255.255.255.0 | 254 | Home network, small office |
| /25 | 255.255.255.128 | 126 | Half of a /24 |
| /26 | 255.255.255.192 | 62 | Department, VLAN |
| /27 | 255.255.255.224 | 30 | Small VLAN |
| /28 | 255.255.255.240 | 14 | Address block from an ISP |
| /29 | 255.255.255.248 | 6 | A few static public IPs |
| /30 | 255.255.255.252 | 2 | Link between two routers |
| /31 | 255.255.255.254 | 2 | Point-to-point link (RFC 3021) |
| /32 | 255.255.255.255 | 1 | Single address: loopback, firewall rule |
How to split a network into subnets
Every extra prefix bit halves the network. To split 192.168.1.0/24 into four, you need 2 bits (2² = 4), which gives /26 subnets: .0/26, .64/26, .128/26 and .192/26, 62 hosts each.
If you start from the number of devices, pick the smallest block with room to spare. 50 devices fit a /26 (62 hosts), 100 a /25 (126), 300 a /23 (510). Leave headroom for printers, access points and growth.
Why /31 and /32 are different
A /31 has only two addresses; take away network and broadcast and nothing is left. RFC 3021 therefore lets point-to-point links use both, and the calculator shows 2 hosts. A /32 is one specific address, used in routes, firewall rules and loopback interfaces.
Subnet calculator or CIDR calculator?
Use this page when you configure a network: mask, wildcard, binary form and host range for a given address. If you need to turn a block such as 203.0.113.0/22 into an address range and count every IP in it, the CIDR calculator is quicker. To convert an address to binary, hex or integer form, use the IP converter.