IP Subnet calculator

Find the network, range, mask and address count for IPv4 or IPv6 CIDR.

Network prefix
192.168.1.0/24

IPv4 with 8 host bits.

Breakdown & share
Subnet mask
255.255.255.0
Address count
256
First usable host
192.168.1.1
Last usable host
192.168.1.254
Broadcast
192.168.1.255
Usable hosts
254
Estimates only.

Your inputs

Example values. Change any of them.

How it’s worked out

See how we got 192.168.1.0/24

The network address retains the prefix bits and clears the host bits. Address count = 2^(address bits − prefix length).

  1. Retain the first 24 bits and clear 8 host bits.
  2. The network is 192.168.1.0/24 and contains 256 addresses.

About this calculator

IPv4 has 32 bits and IPv6 has 128. IPv4 /31 and /32 are special cases. IPv6 results show the first and last addresses, with no broadcast address.

Worked example

Network prefix · 192.168.1.0/24

The network address retains the prefix bits and clears the host bits. Address count = 2^(address bits − prefix length).

  1. Retain the first 24 bits and clear 8 host bits.
  2. The network is 192.168.1.0/24 and contains 256 addresses.

Common questions

What is CIDR notation?

Write the IP address, a slash and the number of network prefix bits, such as 192.168.1.42/24.

Are IPv4 /31 addresses usable?

Both endpoints can be usable for a point-to-point link as described by RFC 3021.

How are IPv6 zeros abbreviated?

The longest run of two or more all-zero groups is compressed to a pair of colons.

Formula sources

Reference checked November 22, 2026.