Skip to content

IPv4 subnet calculator

Explore an IPv4 network, its subnet mask, address range and host counts.

Your IPv4 network192.168.1.0/24
24 network bits8 host bits
Octet 1 192
Octet 2 168
Octet 3 1
Octet 4 42

Tap a bit to set the prefix. Filled bits belong to the network; outlined bits belong to the host.

Subnet mask255.255.255.0
Wildcard mask0.0.0.255
Total addresses256
Host count254
First host192.168.1.1
Last host192.168.1.254
Broadcast192.168.1.255
Address modelConventional network and broadcast exclusions
Entire address range192.168.1.0 → 192.168.1.255
Number of network bits, from 0 to 32.

Try /31 for a point-to-point pair or /32 for a single-address route.

Processed on your device

How it works & useful details

How it works & limits

Enter an IPv4 address and a prefix from /0 to /32. The host bits are cleared to find the network; the range includes both endpoints. IPv4 octets use decimal notation without leading zeros.

/31 uses both addresses on a point-to-point link under RFC 3021. /32 represents one address. Other host counts exclude the network and broadcast addresses. Special-purpose ranges may have additional restrictions; this calculation does not establish availability.

Your working space

Explore the live view, then save copyable text and a downloadable file. Everything is calculated locally. Inputs are not stored; refreshing clears them.

These tools inspect address notation and ranges. They do not contact addresses, check availability or establish connectivity.

About this tool

IPv4 subnet calculator shows the network address, subnet mask, broadcast address, usable host range, and host count for an address and prefix. It answers the routine questions that come up when assigning addresses.

All values are derived from the address and prefix locally. The calculator does not scan or contact the network.

How to use it

  1. Enter an IPv4 address with its prefix, such as 192.168.1.10/24.
  2. Review the network and broadcast addresses.
  3. Check the usable host range and count.
  4. Copy the details into your addressing plan.

Worked example

For 192.168.1.42/24:

  • Network: 192.168.1.0/24, subnet mask 255.255.255.0, wildcard mask 0.0.0.255.
  • Addresses: 192.168.1.0 to 192.168.1.255, 256 in total.
  • Usable hosts: 192.168.1.1 to 192.168.1.254, 254 hosts.
  • Broadcast: 192.168.1.255.

The prefix length says how many leading bits identify the network. The rest identify hosts. With 8 host bits there are 2⁸ = 256 addresses. The all-zeros address names the network and the all-ones address is the broadcast, which leaves 254 hosts.

Quick reference

  • /30: 4 addresses, 2 hosts. Traditional point-to-point links.
  • /31: 2 addresses, both usable on point-to-point links (RFC 3021).
  • /29: 8 addresses, 6 hosts.
  • /28: 16 addresses, 14 hosts.
  • /27: 32 addresses, 30 hosts.
  • /26: 64 addresses, 62 hosts.
  • /24: 256 addresses, 254 hosts. The classic LAN size.
  • /16: 65,536 addresses, 65,534 hosts.

The wildcard mask is the inverted subnet mask. Cisco access lists and OSPF configurations use it instead of the subnet mask. Private ranges for internal networks are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 (RFC 1918).

Frequently asked questions

Why is the usable host count two less than the block size?

The network and broadcast addresses in a subnet cannot be assigned to hosts, except in point-to-point links where conventions differ.

What happens with a /31 or /32 prefix?

These special sizes are reported with their conventional interpretation, including the two-address point-to-point case for /31.

Does it support IPv6?

No. IPv6 uses 128-bit prefixes and a different tooling model.

Does the address have to be the network address?

No. Enter any address in the subnet, such as a host's own IP. The calculator clears the host bits to find the network it belongs to.