Skip to content
CornerTools

Subnet Calculator

Calculate network, broadcast, host range and mask for any IPv4 or IPv6 CIDR, and split, merge or convert ranges.

192.168.1.0/24

Private-Use (RFC 1918), not globally reachable

Broadcast
192.168.1.255
First usable
192.168.1.1
Last usable
192.168.1.254
Usable hosts
254
Total addresses
256
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Binary
11000000.10101000.00000001.00000000
Reverse DNS zone
1.168.192.in-addr.arpa
Legacy class
Class C
Subnet tools
Split by

4 subnets of /26, 62 usable hosts each.

#NetworkHost rangeHosts
1192.168.1.0/26192.168.1.1 – 192.168.1.6262
2192.168.1.64/26192.168.1.65 – 192.168.1.12662
3192.168.1.128/26192.168.1.129 – 192.168.1.19062
4192.168.1.192/26192.168.1.193 – 192.168.1.25462

Type an address with its prefix, such as 192.168.1.77/24, an address and a subnet mask, or an IPv6 network such as 2001:db8::/48, and the tool gives the network, its first and last host, the broadcast address, the masks and how many hosts it holds, with what the range is for according to the IANA registries.

Below the result, the network can be split into equal subnets or into subnets sized for the hosts each needs (VLSM), and separate tools merge a list of blocks, turn a start and end address into CIDR blocks, and check whether an address falls inside the network. Everything is worked out in your browser.

Reading the result

  • Network — the first address, with every host bit zero, and the prefix. An address typed with host bits set, such as 10.1.2.3/8, is kept on its own row and its network worked out.
  • Broadcast — the last address, with every host bit one. IPv6 has none.
  • First and last usable — the addresses hosts can take: all but the network and broadcast address, so a /24 has 256 addresses and 254 usable hosts.
  • Subnet mask and wildcard mask — the prefix as a dotted mask, and its inverse, which Cisco ACLs and OSPF take.
  • Reverse DNS zone — the in-addr.arpa or ip6.arpa zone that holds the network's PTR records. A single address shows its own PTR name.
  • Address type — the line under the network: the IANA special-purpose entry the whole network falls in, and whether the registry marks it globally reachable. A network that spans several entries lists the ones it contains.

A mask after the address is read as a subnet mask when it is one, and otherwise as a wildcard mask. 0.0.0.0 and 255.255.255.255 are both, and are read as subnet masks (/0 and /32), with a note. An address without a prefix is a single address, /32 or /128.

How it works

An address is a 32-bit (IPv4) or 128-bit (IPv6) number. The prefix length is how many leading bits name the network; the rest number the hosts inside it. All arithmetic is done on whole numbers of that size, so an IPv6 /0 is counted exactly.

A /31 holds only two addresses. RFC 3021 lets both be hosts on a point-to-point link, so the tool shows two usable hosts and no broadcast; a /32 is one host. IPv6 /127 links follow RFC 6164.

IPv6 addresses are written in the RFC 5952 form: lowercase, leading zeros dropped, and the longest run of two or more zero groups shortened to :: (the first, when two runs tie). The expanded row writes all eight groups.

VLSM sizes each subnet for its host count, the largest first, and packs them from the start of the network, so every subnet starts on a boundary of its own size. An IPv4 subnet keeps its network and broadcast addresses, so 1 or 2 hosts take a /30 and 3 a /29. /31 for 2-host links, off by default, gives a need of 1 or 2 hosts a /31 instead, as RFC 3021 allows on point-to-point links. VLSM never gives a /32.

network = address AND mask
broadcast = network OR wildcard
total addresses = 2^(32 − prefix)
usable hosts = total − 2 (a /31 has 2, a /32 has 1)

Examples

A home network, 192.168.1.77/24

Address
192.168.1.77
Network
192.168.1.0/24
Broadcast
192.168.1.255
First usable
192.168.1.1
Last usable
192.168.1.254
Usable hosts
254
Total addresses
256
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Reverse DNS zone
1.168.192.in-addr.arpa
Legacy class
Class C

The address keeps its own row because its host bits are not zero; the network is the same for any address from 192.168.1.0 to 192.168.1.255.

10.0.0.0/24 for 60, 30 and 10 hosts

IP address or CIDR
10.0.0.0/24
Split, by Hosts
Sales 60, Office 30, Lab 10
Sales
10.0.0.0/26, 10.0.0.1 – 10.0.0.62, 62 hosts
Office
10.0.0.64/27, 10.0.0.65 – 10.0.0.94, 30 hosts
Lab
10.0.0.96/28, 10.0.0.97 – 10.0.0.110, 14 hosts
Free
10.0.0.112/28, 10.0.0.128/25

Each subnet is the smallest that holds its hosts: 60 hosts take a /26 (62 usable), 30 hosts take a /27 (30 usable), 10 hosts take a /28 (14 usable). Placed largest first, they fill the start of the network, and the rest stays free as 2 blocks.

2001:db8::/48 into /64 networks

IP address or CIDR
2001:db8::/48
Split, by Prefix: New prefix
/64
Subnets
65,536
First three
2001:db8::/64, 2001:db8:0:1::/64, 2001:db8:0:2::/64
Address type
Documentation (RFC 3849), not globally reachable

A /48, a common allocation for one site, holds 65,536 LANs of /64. The table lists the first 1,024; 2001:db8::/32 is reserved for documentation, so examples like this one never reach a real network.

IPv4 prefix cheat sheet

Each prefix length with its masks and sizes
PrefixSubnet maskWildcard maskAddressesUsable hosts
/8255.0.0.00.255.255.25516,777,21616,777,214
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/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

Address types and the standards

Address types come from the IANA IPv4 and IPv6 Special-Purpose Address Registries as last updated on 9 October 2025, with each entry's Globally Reachable flag, the blocks of the IPv4 Multicast Address Space and the top-level IPv6 allocations. IPv6 multicast addresses also show their scope (RFC 7346). A special-purpose block is not always private: the AS112 and anycast blocks are globally reachable. Any IPv4 address outside every entry is public.

The private ranges of RFC 1918 are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16; 100.64.0.0/10 is shared address space for carrier-grade NAT (RFC 6598), and fc00::/7 holds IPv6 unique local addresses.

Sources

Reviewed

Frequently asked questions

The first address names the network and the last is the broadcast address, so neither can be given to a host. Only /31 and /32 are exceptions.
Reverse zones follow octets, so a /26 has no zone of its own: its PTR records sit in the parent /24 zone, which the tool shows. Delegating them to someone else uses the CNAME scheme of RFC 2317.
No. CIDR replaced classes in 1993, and any prefix length can be used anywhere; the legacy class is shown only because exams and older material still mention it.

See also