Subnet Calculator
IPv4 subnet calculator with CIDR, masks, host ranges, subnet splitting, VLSM and IPv6
| # | Subnet | Usable range | Broadcast | Hosts |
|---|---|---|---|---|
| 1 | 192.168.1.0/26 | 192.168.1.1 to 192.168.1.62 | 192.168.1.63 | 62 |
| 2 | 192.168.1.64/26 | 192.168.1.65 to 192.168.1.126 | 192.168.1.127 | 62 |
| 3 | 192.168.1.128/26 | 192.168.1.129 to 192.168.1.190 | 192.168.1.191 | 62 |
| 4 | 192.168.1.192/26 | 192.168.1.193 to 192.168.1.254 | 192.168.1.255 | 62 |
Runs entirely in your browser. Nothing you type or upload is sent to us or stored.
Results are for general guidance. Please check anything important before relying on it. Terms of use
How to Use
- Choose IPv4 or IPv6.
- Type an IP address with its prefix, such as
192.168.1.10/24, or type the address and pick the Prefix / subnet mask from the list. A mask after the address (10.0.0.5 255.255.0.0) also works. - You'll see the network and broadcast addresses, the first and last usable host, the number of hosts, the subnet and wildcard masks, and whether the address is private, public or special. The Binary view highlights the network bits.
- To divide the network, use Split into subnets: into N equal subnets, into subnets with at least N hosts each, or VLSM with a name and host count for each subnet.
- Tap Copy details or Copy table (CSV) to paste the plan into a document or spreadsheet, or Download .csv to open it in Excel.
What a subnet calculator tells you
An IPv4 address such as 192.168.1.10/24 has two parts. The prefix length (/24) says how many of the 32 bits identify the network. The remaining bits identify the host inside it. From those two values this subnet calculator works out the whole subnet: where it starts and ends, how many devices fit, and which mask to type into a router, firewall, cloud VPC or Linux server.
Broadcast address = network OR (NOT mask)
Total addresses = 2^(32 โ prefix)
Usable hosts = total โ 2 (network and broadcast are reserved)
There are two exceptions. A /31 has no network or broadcast address, so both addresses are usable on a point-to-point link (RFC 3021). A /32 is a single host.
Worked example: 172.20.45.130/20
Third octet : 45 AND 240 = 32
Network = 172.20.32.0
Block size = 256 โ 240 = 16 in the third octet, so the next network is 172.20.48.0
Broadcast = 172.20.47.255
Usable hosts = 2^12 โ 2 = 4,094 (172.20.32.1 to 172.20.47.254)
Wildcard mask = 0.0.15.255
Type 172.20.45.130/20 above to check it, and look at the binary view to see why: the first 20 bits are copied from the address, and the rest become 0 for the network address and 1 for the broadcast address.
Common prefixes
| Prefix | Subnet mask | Usable hosts | Typical use |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 | The whole 10.x.x.x private block |
| /16 | 255.255.0.0 | 65,534 | A cloud VPC or a campus |
| /22 | 255.255.252.0 | 1,022 | A large office floor or hostel Wi-Fi |
| /24 | 255.255.255.0 | 254 | A home or small-office LAN (192.168.1.0/24) |
| /26 | 255.255.255.192 | 62 | A department VLAN |
| /28 | 255.255.255.240 | 14 | A small block of public IPs from an ISP |
| /30 | 255.255.255.252 | 2 | A router-to-router link |
| /32 | 255.255.255.255 | 1 | A single host or loopback |
Private, public and special addresses
RFC 1918 reserves three ranges for private networks: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Home Wi-Fi routers, office LANs and cloud VPCs use them, and NAT translates them to a public address on the internet. Internet providers use 100.64.0.0/10 for carrier-grade NAT. If your router's WAN address falls in that range, you share a public IP with other customers and can't accept incoming connections (for a CCTV recorder or a home server) without your ISP's help. The calculator also flags loopback (127.0.0.0/8), link-local (169.254.0.0/16), documentation, multicast and reserved ranges.
Splitting a network and VLSM
Splitting a /24 into 4 equal subnets borrows 2 host bits and gives four /26 networks of 62 hosts each. Equal splits always come in powers of two. When departments need different sizes, use VLSM (variable-length subnet masking). The calculator sorts the requests from largest to smallest and gives each one the smallest block that fits, which keeps every block aligned. For 100, 50, 20 and 2 hosts inside 192.168.1.0/24 you get a /25, a /26, a /27 and a /30, using 228 of the 256 addresses and leaving the rest free for later.
IPv6 basics
IPv6 addresses have 128 bits written as 8 groups of hex digits. Leading zeros in a group can be dropped, and one run of zero groups can be written as ::, so 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1. The calculator shows both forms, the first and last address of a prefix, and how many /64 networks a larger prefix contains. A normal IPv6 LAN is a /64, because automatic address configuration (SLAAC) needs exactly 64 host bits.
Tips
- AWS reserves 5 addresses in every VPC subnet (Azure also reserves 5), so a /24 there gives 251 usable IPs, not 254.
- The wildcard mask is the inverse of the subnet mask. Cisco ACLs and OSPF network statements use it.
- Classes A, B and C are historical. Since CIDR was introduced in 1993, any prefix length can be used with any address.