Compute the network address, broadcast address, usable host range and more from CIDR notation or an IP paired with a netmask.
Try an example
IPv4 prefix cheat sheet
Prefix
Netmask
Wildcard mask
Total addresses
Usable hosts
/32
255.255.255.255
0.0.0.0
1
1
/31
255.255.255.254
0.0.0.1
2
2
/30
255.255.255.252
0.0.0.3
4
2
/29
255.255.255.248
0.0.0.7
8
6
/28
255.255.255.240
0.0.0.15
16
14
/27
255.255.255.224
0.0.0.31
32
30
/26
255.255.255.192
0.0.0.63
64
62
/25
255.255.255.128
0.0.0.127
128
126
/24
255.255.255.0
0.0.0.255
256
254
/23
255.255.254.0
0.0.1.255
512
510
/22
255.255.252.0
0.0.3.255
1024
1022
/21
255.255.248.0
0.0.7.255
2048
2046
/20
255.255.240.0
0.0.15.255
4096
4094
/19
255.255.224.0
0.0.31.255
8192
8190
/18
255.255.192.0
0.0.63.255
16384
16382
/17
255.255.128.0
0.0.127.255
32768
32766
/16
255.255.0.0
0.0.255.255
65536
65534
/15
255.254.0.0
0.1.255.255
131072
131070
/14
255.252.0.0
0.3.255.255
262144
262142
/13
255.248.0.0
0.7.255.255
524288
524286
/12
255.240.0.0
0.15.255.255
1048576
1048574
/11
255.224.0.0
0.31.255.255
2097152
2097150
/10
255.192.0.0
0.63.255.255
4194304
4194302
/9
255.128.0.0
0.127.255.255
8388608
8388606
/8
255.0.0.0
0.255.255.255
16777216
16777214
/7
254.0.0.0
1.255.255.255
33554432
33554430
/6
252.0.0.0
3.255.255.255
67108864
67108862
/5
248.0.0.0
7.255.255.255
134217728
134217726
/4
240.0.0.0
15.255.255.255
268435456
268435454
/3
224.0.0.0
31.255.255.255
536870912
536870910
/2
192.0.0.0
63.255.255.255
1073741824
1073741822
/1
128.0.0.0
127.255.255.255
2147483648
2147483646
/0
0.0.0.0
255.255.255.255
4294967296
4294967294
Nothing you enter is stored - this is pure arithmetic, computed and returned in the same request.
About IP Subnet Calculator
A CIDR block or an IP address paired with a netmask hides a handful of facts you usually need right away: the network and broadcast address, how many hosts actually fit, and which addresses are the first and last you can assign. This works them all out instantly, for IPv4 and IPv6 alike, entirely as arithmetic - nothing you enter is looked up, logged or stored.
What it does
Accepts CIDR notation (192.168.1.0/24), an IPv6 prefix (2001:db8::/32), or a bare IP with a separate dotted netmask.
Masks off host bits automatically, so pasting a host address like 192.168.1.5/24 still gives the right network.
Reports network address, broadcast address (IPv4), netmask, wildcard mask, prefix length, total addresses and usable host count.
Gives the first and last usable host address directly, without listing every address in between.
Flags whether a network falls in private, carrier-grade NAT, loopback or other reserved address space.
Handles a single host (/32 or /128) and a point-to-point link (/31) correctly, where every address is usable.
Also converts an IP range (first and last address) into the smallest exact list of CIDR blocks, and lists every IPv4 prefix from /32 to /0 in a cheat sheet.
How it works
1Paste CIDR notation, or an IP address plus a separate netmask.
2Press Calculate.
3Read off the network address, host range and address count.
Why usable hosts is not the same as total addresses
An IPv4 network reserves its first address for the network itself and its last for a broadcast, so a /24 has 256 total addresses but only 254 you can assign. A /31 and a /32 are the exceptions: RFC 3021 makes both addresses of a /31 usable for a point-to-point link, and a /32 is a single host route with nothing to reserve. IPv6 has no broadcast address, so this tool counts every address in an IPv6 subnet as usable, including the network address. Two IPv6 details it does not subtract: RFC 4291 makes the all-zeros address of each subnet the Subnet-Router anycast address, and RFC 6164 recommends a /127 for links between routers.
Worked examples
10.20.30.40/22 belongs to network 10.20.28.0 with netmask 255.255.252.0, wildcard 0.0.3.255 and broadcast 10.20.31.255: 1,024 addresses, 1,022 usable hosts from 10.20.28.1 to 10.20.31.254. 172.16.5.4/27 gives network 172.16.5.0, broadcast 172.16.5.31 and 30 usable hosts (172.16.5.1 to 172.16.5.30). In the range converter, 192.168.1.10 to 192.168.1.40 is 31 addresses and needs five blocks: 192.168.1.10/31, 192.168.1.12/30, 192.168.1.16/28, 192.168.1.32/29 and 192.168.1.40/32. A range that lines up with a prefix, such as 10.0.0.0 to 10.0.3.255, collapses to the single block 10.0.0.0/22.
Why a /0 or a huge IPv6 prefix still returns instantly
A /0 network holds every IPv4 address there is, and a large IPv6 prefix can hold more addresses than there are stars in the observable universe. The counts and bounds here come from direct arithmetic on the network's own numeric range, never from stepping through each address one at a time, so the size of the network never changes how long the answer takes.
What "reserved" means here
Beyond the everyday private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16), the classification also covers carrier-grade NAT space (100.64.0.0/10) that some providers and mesh VPNs use internally, and a handful of IANA special-purpose ranges reserved for protocol infrastructure like AS112 and 6to4 relays - none of which are addresses you would expect to see on an ordinary public website.
Questions
Does this tool look up or connect to the address I enter?
No. It only parses the text you typed and does arithmetic on it, so nothing is resolved or fetched. The address itself is never logged or stored; the site records only a usage event saying whether the input was valid and whether it was IPv4 or IPv6.
What happens if I enter a host address instead of a network address, like 192.168.1.5/24?
The host bits are masked off automatically, so you get the same result as entering 192.168.1.0/24 - the network your address actually belongs to.
Does it support IPv6?
Yes, any prefix length from /0 to /128. IPv6 has no broadcast address, so the tool reports every address in the subnet as usable, including the network address. In practice the all-zeros address of a subnet is the Subnet-Router anycast address (RFC 4291), so do not assign it to a host.
Why does a /31 or /32 network show every address as usable?
A /32 is a single host with no network or broadcast address to reserve. A /31 is the two-address point-to-point link defined in RFC 3021, where both addresses are usable rather than one being reserved as a broadcast address.
Can I enter an IP and a netmask instead of CIDR notation?
Yes. Leave the first field as a bare IP address and put a dotted netmask like 255.255.255.0 in the second field instead of a /prefix. A Cisco-style wildcard mask such as 0.0.0.255 works there too and gives the same /24. A non-contiguous mask like 255.0.255.0 is refused, because it describes no single CIDR block.
How do I split a /24 into smaller subnets?
The tool does not split for you, but the arithmetic is short: each bit you add to the prefix doubles the number of subnets and halves their size. A /24 (256 addresses) splits into two /25s of 128, four /26s of 64 or eight /27s of 32. The four /26s of 192.168.10.0/24 start at .0, .64, .128 and .192, and each has 62 usable hosts, so 192.168.10.64/26 runs from .65 to .126 with .127 as its broadcast. Enter each block here to check its range, and pick the size from the prefix table on this page: 50 devices need a /26, because a /27 has only 30 usable hosts.
Which IP address ranges are private?
Three IPv4 ranges are private under RFC 1918: 10.0.0.0/8 (10.0.0.0 to 10.255.255.255, 16,777,216 addresses), 172.16.0.0/12 (172.16.0.0 to 172.31.255.255, 1,048,576 addresses) and 192.168.0.0/16 (192.168.0.0 to 192.168.255.255, 65,536 addresses). A common slip is 172.32.0.0 and above, which is public: only 172.16 to 172.31 is private. Three more ranges are not routed on the public internet either: 100.64.0.0/10 is carrier-grade NAT space for providers (RFC 6598), 169.254.0.0/16 is link-local, the address a device gives itself when DHCP fails (RFC 3927), and 127.0.0.0/8 is loopback. In IPv6, unique local addresses fc00::/7 (RFC 4193, in practice fd00::/8) play the private role and fe80::/10 is link-local. Enter any block here and the result labels it Private, Carrier-grade NAT, Link-local, Loopback or Public.
What is a wildcard mask and where do I use it?
A wildcard mask is the netmask with every bit flipped, so each octet is 255 minus the netmask octet: 255.255.255.0 (/24) becomes 0.0.0.255 and 255.255.255.192 (/26) becomes 0.0.0.63. A 0 bit means that bit must match and a 1 bit means any value is allowed. Cisco IOS access lists and OSPF network statements take a wildcard instead of a netmask: access-list 10 permit 192.168.10.64 0.0.0.63 matches 192.168.10.64 to 192.168.10.127, and network 10.0.0.0 0.0.0.255 area 0 enables OSPF on interfaces in 10.0.0.0/24. A netmask typed where a wildcard belongs matches the wrong addresses, so copy the Wildcard mask row from the result or from the prefix table on this page.