Subnet Calculator

192.168.1.10/24 is the network 192.168.1.0 with mask 255.255.255.0, hosts 192.168.1.1 to 192.168.1.254 (254 usable) and broadcast 192.168.1.255. Split into /26 it gives 4 subnets.

Did this solve your problem?
Prefer us on Google

How to use

  1. Type an IPv4 address with a prefix such as 192.168.1.10/24, or with a mask such as 192.168.1.10 255.255.255.0.
  2. Read the network address, broadcast address, host range, number of usable hosts, mask, wildcard mask and the binary form.
  3. To split the network, pick a longer prefix under the result. The table lists every subnet with its host range.
  4. For IPv6, enter an address with a prefix length such as 2001:db8::/48 to see the first and last address and the number of addresses.

How it works

The mask has the first N bits set to 1 for a /N prefix. The network address is the IP address AND the mask. The broadcast address is the network address OR the wildcard mask, and the wildcard mask is the mask inverted.

A block holds 2 to the power of (32 minus N) addresses. For a normal subnet the first address is the network and the last is the broadcast, so the usable hosts are the total minus 2.

A /31 has two addresses and no network or broadcast address. RFC 3021 lets both be used as hosts on a point-to-point link, so the calculator shows 2 usable hosts. A /32 is a single address and shows 1.

IPv6 works the same way with 128 bits. The tool shows the network prefix, the last address in the block and the number of addresses, 2 to the power of (128 minus N). It does not split IPv6 blocks or label address types.

Common prefix lengths

Each extra bit in the prefix halves the block. Usable hosts are the total minus the network and broadcast addresses, except for /31 and /32.

PrefixSubnet maskAddressesUsable hosts
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/20255.255.240.04,0964,094
/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

Private and special ranges

These ranges are reserved by the IETF and are not routed on the public internet. The calculator labels an address when it falls in one of them.

RangePurposeDefined in
10.0.0.0/8Private networkRFC 1918
172.16.0.0/12Private networkRFC 1918
192.168.0.0/16Private networkRFC 1918
100.64.0.0/10Carrier-grade NAT shared spaceRFC 6598
127.0.0.0/8LoopbackRFC 1122
169.254.0.0/16Link-local (automatic addressing)RFC 3927
224.0.0.0/4MulticastRFC 5771

Splitting a network

Choose a longer prefix to cut a network into equal blocks. A /24 split into /26 gives 4 subnets of 64 addresses, each with 62 usable hosts. The table lists up to 256 subnets and shows the total count when there are more.

FAQ

Why does a /24 have 254 usable hosts and not 256?

The first address of the block names the network and the last is the broadcast address, so neither can be given to a host. 256 minus 2 leaves 254.

What happens with /31 and /32?

A /31 has 2 addresses and is meant for point-to-point links, where RFC 3021 allows both to be used as hosts. A /32 is one address, used for a single host or a loopback. Neither has a separate broadcast address.

What is a wildcard mask?

It is the subnet mask with every bit flipped, for example 0.0.0.255 for 255.255.255.0. Some router access lists and OSPF network statements use it instead of the mask.

What if I enter a host address and not the network address?

The tool applies the mask and shows the network the address belongs to. 192.168.1.10/24 and 192.168.1.200/24 give the same network, 192.168.1.0/24.

Why is a number like 010.1.1.1 rejected?

Some systems read a leading zero as octal, which gives a different address. To avoid that mistake the tool only accepts plain decimal octets from 0 to 255 without leading zeros.

Does it support IPv6 subnetting?

Only basic prefix information: the network, the last address and the number of addresses. A /64 is the usual size of one IPv6 subnet, and a /48 holds 65,536 of them.