Find the network address, broadcast address, usable host range, subnet and wildcard masks for any IPv4 or IPv6 address and prefix.
You can also type CIDR notation in the address box, such as 10.0.0.0/8 or 2001:db8::/32.
Usable hosts exclude the network and broadcast addresses, except for /31 point-to-point links (RFC 3021) and single-host /32 routes. IPv6 has no broadcast address, so every address in the range can be assigned.
An IP subnet calculator takes an IP address and a prefix length or subnet mask and shows the network it belongs to: the network and broadcast addresses, the range of usable host addresses, the number of hosts and the matching masks. For example, 192.168.1.10 with a /24 mask (255.255.255.0) is in the 192.168.1.0/24 network, which has 254 usable hosts from 192.168.1.1 to 192.168.1.254 and a broadcast address of 192.168.1.255.
The calculator handles both IPv4 and IPv6. It’s useful for network engineers planning address space, students preparing for networking exams, and anyone setting up a router, firewall rule, VPN or cloud network who needs to know exactly which addresses a subnet covers.
An IPv4 address is 32 bits long, usually written as four numbers from 0 to 255 called octets. The prefix length says how many of those bits, counting from the left, identify the network. The remaining bits identify individual hosts within it.
Take 172.16.5.200/26. A /26 leaves 6 host bits, so each subnet has 2⁶ = 64 addresses, and subnets start at multiples of 64 in the last octet: 0, 64, 128 and 192. Since 200 falls between 192 and 255, the network address is 172.16.5.192 and the broadcast address is 172.16.5.255. The usable hosts are 172.16.5.193 to 172.16.5.254, which is 62 addresses. The subnet mask is 255.255.255.192 and the wildcard mask is 0.0.0.63.
A /31 has only two addresses. Under RFC 3021, both can be used on a point-to-point link between two routers, with no network or broadcast address, which saves addresses. A /32 identifies a single host and is common in routing tables, firewall rules and loopback interfaces.
Each extra bit you add to the prefix halves the size of the subnet and doubles the number of subnets. Borrowing 2 bits from a /24 gives four /26 subnets of 64 addresses each. For 192.168.10.0/24, those subnets are:
To find the right prefix for a group of devices, take the number of hosts you need, add 2, and round up to the next power of two. Fifty devices need 52 addresses, which rounds up to 64, so a /26 fits. Networks often mix sizes, a technique called variable-length subnet masking (VLSM): for example, a /25 for staff computers, a /27 for printers and phones, and /30 or /31 links between routers, all carved from one larger block. Allocate the largest subnets first so the smaller ones fit neatly into the gaps.
| Prefix | Subnet mask | Addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
Before CIDR was introduced in 1993, IPv4 addresses were divided into fixed classes by their first octet: Class A (1–126) with a /8 mask, Class B (128–191) with /16, and Class C (192–223) with /24. Class D (224–239) is used for multicast and Class E (240–255) is reserved. Classes no longer control how networks are allocated, but the terms are still used, and the calculator shows the class for reference.
Some ranges are reserved for special uses, and the calculator labels them:
IPv6 addresses are 128 bits long and written as eight groups of four hexadecimal digits separated by colons. To keep them readable, leading zeros in each group can be dropped, and one run of consecutive all-zero groups can be replaced with a double colon. So 2001:0db8:0000:0000:0000:0000:0000:0001 is written 2001:db8::1. The calculator shows both the expanded and compressed forms, using the standard compression rules of RFC 5952.
IPv6 has no broadcast address and no need to reserve a network address for hosts, so every address in a block is usable. Subnets are usually much larger than in IPv4. A typical local network is a /64, which contains 2⁶⁴, or about 18.4 quintillion, addresses. Sites are often given a /48, which contains 65,536 /64 subnets, and internet providers may hand a /56 or /48 to each customer.
For 2001:db8:85a3::8a2e:370:7334/64, the first 64 bits are the network prefix, 2001:db8:85a3::/64. The range runs from 2001:db8:85a3:0:0:0:0:0 to 2001:db8:85a3:0:ffff:ffff:ffff:ffff. The 2001:db8::/32 block is reserved for documentation, so the calculator labels it accordingly.
The calculator runs entirely in your browser. The addresses you enter aren’t sent to a server or stored, so you can safely use it with internal network details.
Two other tools work well alongside this one: the binary calculator, to do binary arithmetic and convert binary to decimal, and the bandwidth calculator, to work out download times and the speed you need.
254. A /24 has 256 addresses, minus the network and broadcast addresses.
255.255.255.0. A /16 is 255.255.0.0 and a /8 is 255.0.0.0.
Apply a bitwise AND between the IP address and the subnet mask, which sets every host bit to 0. For 192.168.1.10/24, the network address is 192.168.1.0.
Raise 2 to the power of the number of host bits (32 minus the prefix) and subtract 2. A /27 has 2⁵ − 2 = 30 usable hosts.
The inverse of the subnet mask, with 1s where the mask has 0s. For 255.255.255.0 it's 0.0.0.255. Wildcard masks are used in access lists and OSPF configuration.
Classless Inter-Domain Routing. It writes a network as an address followed by a slash and the prefix length, such as 10.0.0.0/8, instead of using fixed address classes.
10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. They're used inside local networks and aren't routed on the public internet.
Yes, on point-to-point links. RFC 3021 allows both addresses in a /31 to be used, since no broadcast address is needed.
2⁶⁴, which is 18,446,744,073,709,551,616 addresses.
Leading zeros in each group are dropped, and the longest run of all-zero groups is replaced with ::, which can appear only once.
No. All calculations run in your browser.