Skip to content

How many addresses are in your subnet?

Work out the network, mask, range and host count of an IPv4 or IPv6 block, and split it into smaller subnets.

For example 192.168.1.10/24, 192.168.1.10 255.255.255.0 or 2001:db8::1/64.

Split into subnets

Usable addresses

254

Network 192.168.1.0/24, 256 addresses in all

Details

Network address
192.168.1.0
Netmask
255.255.255.0
Wildcard mask
0.0.0.255
Broadcast address
192.168.1.255
First usable address
192.168.1.1
Last usable address
192.168.1.254
All addresses
256
Range type
Private use
Mask in binary
11111111.11111111.11111111.00000000

Work out the network, mask, range and host count of an IPv4 or IPv6 block, and split it into smaller subnets.

How to use

  1. Type an address with its prefix length or mask, for example 192.168.1.10/24 or 2001:db8::1/64.
  2. Read the network, mask, host range and address count in the result.
  3. To cut the block into smaller subnets, open Split into subnets and enter a longer prefix length.

Common IPv4 prefix lengths

PrefixNetmaskAddresses
/8255.0.0.016,777,216
/16255.255.0.065,536
/20255.255.240.04,096
/22255.255.252.01,024
/24255.255.255.0256
/25255.255.255.128128
/26255.255.255.19264
/27255.255.255.22432
/28255.255.255.24016
/30255.255.255.2524

How it works

An IP address has a network part and a host part. The prefix length after the slash says how many leading bits belong to the network: /24 means the first 24 of an IPv4 address's 32 bits. The rest number the hosts inside it (CIDR, RFC 4632).

A block of prefix length p holds 2^(32 − p) IPv4 addresses, or 2^(128 − p) IPv6 addresses. In IPv4 the first address names the network and the last is the broadcast address, so a /24 has 2^8 − 2 = 254 usable hosts. A /31 is a two-address link where both are hosts (RFC 3021), and a /32 is one host. IPv6 has no broadcast address.

Splitting a /24 into /26 subnets makes 2^(26 − 24) = 4 blocks of 64 addresses. The tool shows IPv6 addresses in the short form of RFC 5952. It does not know your routers: reserved addresses such as a gateway are for you to subtract.

Frequently asked questions

How many hosts are in a /24?

256 addresses, of which 254 can be given to hosts: the first is the network address and the last the broadcast address.

What is the subnet mask of /26?

255.255.255.192. It has 26 one-bits, and the block holds 64 addresses.

What is a wildcard mask?

The mask with every bit flipped, such as 0.0.0.255 for /24. Some router and firewall rules use it instead of the netmask.

Why can a /31 have two hosts?

On a point-to-point link there is nobody to broadcast to, so RFC 3021 lets both addresses be hosts.

Is 192.168.1.0 a private address?

Yes. 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are reserved for private networks (RFC 1918); the tool names the range of what you enter.

Send feedback