Open Doc Tools

IP Subnet Calculator

Network address, host range, broadcast, mask and every subnet for an IPv4 address, plus IPv6 ranges.

Runs in your browser โ€” nothing uploadednew
Was this tool helpful?

Comments

Something not working, or an idea to make this tool better? Write it here.

0/1000 ยท no links

No comments yet. Be the first.

How to use IP Subnet Calculator

  1. Pick a subnet mask, for example 255.255.255.0 /24, and type an IPv4 address. The network class only limits which masks are offered.
  2. Press Calculate for the network address, the usable host range, the broadcast address, the masks and a list of the neighbouring subnets.
  3. For IPv6, use the second calculator: choose a prefix length and enter the address, in full or shortened with ::.

CIDR cheat sheet

The prefix lengths people use most, with the mask written both ways.

CIDRSubnet maskWildcard maskAddressesUsable hosts
/8255.0.0.00.255.255.25516,777,21616,777,214
/12255.240.0.00.15.255.2551,048,5761,048,574
/16255.255.0.00.0.255.25565,53665,534
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011

Private and special IPv4 ranges

RangeCIDRUsed for
10.0.0.0 to 10.255.255.25510.0.0.0/8Private networks
172.16.0.0 to 172.31.255.255172.16.0.0/12Private networks
192.168.0.0 to 192.168.255.255192.168.0.0/16Private networks, most home routers
127.0.0.0 to 127.255.255.255127.0.0.0/8Loopback, the machine itself
169.254.0.0 to 169.254.255.255169.254.0.0/16Link-local, used when no DHCP server answers
100.64.0.0 to 100.127.255.255100.64.0.0/10Shared space for carrier-grade NAT
224.0.0.0 to 239.255.255.255224.0.0.0/4Multicast

The calculator labels the address you enter with one of these types, or Public when it is in none of them.

The IP class comes from the first number: A is 0 to 127, B is 128 to 191, C is 192 to 223, D is 224 to 239 and E is 240 to 255. Classes are history now. The prefix length decides the network.

The subnet formulas

Addresses in a subnet
addresses = 2 ^ (32 โˆ’ prefix length)
/26 = 2 ^ 6 = 64 addresses, 62 of them usable
Network address
IP address AND subnet mask, bit by bit
192.168.1.130 with /26 (255.255.255.192) = 192.168.1.128
Broadcast address
network address + addresses โˆ’ 1
192.168.1.128 + 63 = 192.168.1.191
Usable host range
network address + 1 to broadcast address โˆ’ 1
192.168.1.129 to 192.168.1.190
Addresses in an IPv6 prefix
addresses = 2 ^ (128 โˆ’ prefix length)
/64 = 2 ^ 64 = 18,446,744,073,709,551,616 addresses

Questions

Is it free?
Yes. It runs in your browser, and nothing you type is sent anywhere.
What does the subnet calculator show?
For an IPv4 address and prefix it gives the network address, the usable host range, the broadcast address, the total and usable number of hosts, the subnet and wildcard masks, the binary mask, the IP class, the CIDR notation and whether the address is private, public, loopback, link-local, shared (CGNAT) or multicast.
Why are there two fewer usable hosts than addresses?
In a normal subnet the first address names the network and the last is the broadcast address, so a /24 has 256 addresses and 254 usable hosts. A /31 is the exception โ€” both addresses are usable on a point-to-point link โ€” and a /32 is a single host.
What is a wildcard mask?
The subnet mask with every bit flipped. For 255.255.255.0 it is 0.0.0.255. Routers and firewall rules (for example Cisco ACLs and OSPF) use it to say which bits of an address must match.
Does it work with IPv6?
Yes. Enter an IPv6 address and a prefix length to see the compressed and full forms of the address, the network, the first and last address in the range, and how many addresses it holds.
Can it list every subnet of a given size?
Yes. Under the result is a table of every network of the chosen size inside the larger block around it, with the usable range and broadcast address of each. When there are more than 256, the first 256 are shown.

Also called

IP Subnet Calculator does all of these. Looking for something else? Search every tool.

Other Productivity tools