Skip to content

Subnet calculator (CIDR, IPv4 and IPv6)

Type a CIDR block like 10.0.0.0/16 to see its address range, usable hosts, subnet mask and bits, then split it into smaller subnets. Works for IPv4 and IPv6.

  • Runs in your browser
  • Nothing is uploaded
  • Free, no sign-up

CIDR like 10.0.0.0/16, an address and mask like 192.168.1.10 255.255.255.0, or IPv6 like 2001:db8::/48.

Try:
Network: 24 bitsHost: 8 bits (28 = 256 addresses)

Results

CIDR notation
192.168.1.0/24
Address type
Private
RFC 1918 private range: used inside home and company networks, not routed on the internet.
Network address
192.168.1.0
Broadcast address
192.168.1.255
Usable host range
192.168.1.1 – 192.168.1.254
Usable hosts
254
256 addresses in total
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255

The first address names the network and the last is the broadcast address, so neither is given to a device.

Split into subnets

4 subnets of /26. Select one to open it.

SubnetUsable hosts
192.168.1.1 – 192.168.1.62(62)
192.168.1.65 – 192.168.1.126(62)
192.168.1.129 – 192.168.1.190(62)
192.168.1.193 – 192.168.1.254(62)

IPv4 subnet mask cheat sheet

Every IPv4 prefix length with its subnet mask and size. Each step down the list halves the block.

PrefixSubnet maskAddressesUsable hosts
/00.0.0.04,294,967,2964,294,967,294
/1128.0.0.02,147,483,6482,147,483,646
/2192.0.0.01,073,741,8241,073,741,822
/3224.0.0.0536,870,912536,870,910
/4240.0.0.0268,435,456268,435,454
/5248.0.0.0134,217,728134,217,726
/6252.0.0.067,108,86467,108,862
/7254.0.0.033,554,43233,554,430
/8255.0.0.016,777,21616,777,214
/9255.128.0.08,388,6088,388,606
/10255.192.0.04,194,3044,194,302
/11255.224.0.02,097,1522,097,150
/12255.240.0.01,048,5761,048,574
/13255.248.0.0524,288524,286
/14255.252.0.0262,144262,142
/15255.254.0.0131,072131,070
/16255.255.0.065,53665,534
/17255.255.128.032,76832,766
/18255.255.192.016,38416,382
/19255.255.224.08,1928,190
/20255.255.240.04,0964,094
/21255.255.248.02,0482,046
/22255.255.252.01,0241,022
/23255.255.254.0512510
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422
/32255.255.255.25511

How it works

An IP address is a number: 32 bits for IPv4, 128 for IPv6. CIDR notation like 192.168.1.0/24 says how many of those bits, counted from the left, name the network (24 here). The bits that are left over number the devices inside it, so a /24 has 8 host bits and 28 = 256 addresses. The coloured bits above show the split, and moving the slider moves the line between them.

In IPv4 the first address of a block is the network address and the last is the broadcast address, so a /24 leaves 254 addresses for devices. Two exceptions: a /31 is a point-to-point link where both addresses are usable, and a /32 is a single address. IPv6 has no broadcast address, so every address in the block counts.

The subnet mask is the same split written as an address (/24 is 255.255.255.0), and the wildcard mask is its inverse (0.0.0.255), as used in Cisco access lists and OSPF. Splitting a block lists the smaller subnets it divides into, in order.

Limits

It works on one block at a time. It doesn't yet turn an address range like 10.0.0.5 to 10.0.0.20 into CIDR blocks, or merge several blocks into one.

A split shows the first 256 subnets; the count above the list is always the full number. Address types (private, documentation, multicast and so on) come from the IANA special-purpose registries; anything else is shown as public.

The block you enter is kept after the # in the page address, so you can bookmark or share it. That part of an address is never sent to a server.

Privacy

This tool runs entirely in your browser. The files you open and what you type are never sent to a server, and nothing is stored after you close the page. See the privacy page.

Related tools