Skip to content

IP Subnet Calculator

Enter an IPv4 address with a CIDR prefix or subnet mask to get the network and broadcast addresses, usable host range, wildcard mask, binary view and address type, and split a network into equal subnets.

  • Free, no sign-up
  • Runs in your browser
  • Developer
For example 192.168.1.10, or 10.0.0.5/8 with the prefix included.
0–32 (e.g. 24) or a mask such as 255.255.255.0.
The number is rounded up to a power of 2 (e.g. 3 → 4 subnets). Up to 256 are listed.

Read the guide How Subnetting Works: Plan an IPv4 Network Step by Step

How to use the subnet calculator

  1. Enter an IPv4 address such as 192.168.1.10. You can also type the prefix with it, like 10.0.0.5/8.
  2. Enter the prefix length (0 to 32) or a dotted subnet mask such as 255.255.255.0. The mask must be contiguous: all 1 bits on the left, all 0 bits on the right.
  3. Optionally enter how many subnets you want, to split the network into equal parts.
  4. Press Calculate. The key figures appear in the result card, and the binary view and subnet list appear below.

Everything is calculated in your browser.

How it works

An IPv4 address is a 32-bit number, written as four bytes in decimal. The prefix length says how many bits from the left belong to the network; the remaining bits number the hosts inside it.

  • Network address = address AND mask (all host bits set to 0)
  • Broadcast address = network OR wildcard mask (all host bits set to 1)
  • Wildcard mask = the mask with every bit inverted
  • Total addresses = 2 to the power of (32 − prefix)
  • Usable hosts = total addresses − 2, because the network and broadcast addresses cannot be given to a device

Worked example

For 192.168.1.10/24 the mask is 255.255.255.0 and the wildcard mask is 0.0.0.255. The network address is 192.168.1.0 and the broadcast address is 192.168.1.255. That leaves 256 addresses, of which 254 are usable: 192.168.1.1 to 192.168.1.254. It is a private address from the RFC 1918 range.

A less round example: 172.16.5.77/20 belongs to the network 172.16.0.0, whose broadcast address is 172.16.15.255, with 4,094 usable hosts.

Splitting a network

Splitting borrows bits from the host part. Asking for 3 subnets of 192.168.1.0/24 borrows 2 bits, because 2 bits give 4 equal subnets: /26 networks starting at .0, .64, .128 and .192, each with 62 usable hosts. The number of subnets is always rounded up to a power of 2.

Special cases

  • /31: under RFC 3021 both addresses can be used on a point-to-point link, so there are 2 usable hosts and no broadcast address.
  • /32: a single address, used for host routes and loopback interfaces.
  • Private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) are for local networks and are not routed on the internet. The tool also recognizes loopback, link-local, carrier-grade NAT, documentation, multicast and reserved ranges.
  • Address classes (A to E) are shown for reference only. Modern networks use classless addressing (CIDR).

Frequently asked questions

What does the number after the slash mean?

It is the prefix length: how many of the 32 bits identify the network. /24 means the first 24 bits are the network and the last 8 bits number the hosts, which is the same as the mask 255.255.255.0.

Why are there two fewer usable hosts than addresses?

In a normal subnet the first address identifies the network itself and the last one is the broadcast address that reaches every device. Neither can be assigned to a single device. The exceptions are /31 point-to-point links and /32 single addresses.

What is a wildcard mask used for?

A wildcard mask is the inverted subnet mask. Router access lists and some routing protocols, such as OSPF on Cisco devices, use it to say which bits of an address must match. For a /24 it is 0.0.0.255.

Why does the tool reject an address like 192.168.01.1?

Some systems read a number with a leading zero as octal, so 010 could mean 8 instead of 10. To avoid this ambiguity, write each part without leading zeros.

Does this calculator support IPv6?

No, it works with IPv4 addresses only. IPv6 uses 128-bit addresses and different conventions, such as no broadcast addresses.