IP Subnet Calculator

Calculate network, broadcast, mask and host range for any IPv4 or IPv6 CIDR block, and split it into smaller subnets.

Runs in your browser. Nothing is uploaded.

IPv4 address with a prefix (/26) or a mask (255.255.255.192)

Subnet details

How to use the IP Subnet Calculator

  1. Enter an IP address with a prefix, such as 192.168.1.130/26, or with a mask, such as 10.0.0.0 255.255.252.0.
  2. Read the network address, mask, wildcard, broadcast address and usable host range.
  3. Choose a New prefix under Split into smaller subnets to list the subnets the network divides into.
  4. IPv6 works too. Enter an address like 2001:db8::1/64 to see the network and its range.

What a subnet calculator does

Every IP network is described by an address and a prefix length, written in CIDR notation such as 192.168.1.0/24. The prefix says how many of the leading bits identify the network; the remaining bits number the hosts inside it. From those two facts you can work out everything else: the network address, the broadcast address, the range of usable host addresses, the subnet mask, and how many devices the network can hold. Doing that by hand means converting to binary and back. This calculator does it instantly.

Reading the results

Enter 192.168.1.130/26. The calculator finds the network that address belongs to:

  • Network 192.168.1.128/26, the first address of the block
  • Subnet mask 255.255.255.192, the same prefix written as a dotted mask
  • Wildcard mask 0.0.0.63, the inverse, used in some router configurations
  • Broadcast 192.168.1.191, the last address
  • Usable hosts 192.168.1.129 to 192.168.1.190, 62 in total

It also tells you the address type, here a private RFC 1918 address, and shows the mask in binary so you can see where the network bits end.

Splitting a network

Network planning often means dividing a block into smaller ones, for example one per office, VLAN or cloud availability zone. Choose a longer prefix and the calculator lists every subnet. A 10.0.0.0/22 split into /24 networks gives four: 10.0.0.0/24, 10.0.1.0/24, 10.0.2.0/24 and 10.0.3.0/24. Each additional prefix bit doubles the number of subnets and halves their size.

IPv6

IPv6 addresses are 128 bits and usually written in compressed form. The calculator accepts any valid notation, shows the address in its standard compressed form, and gives the first and last address of the prefix. Most IPv6 LANs use /64, which contains 18,446,744,073,709,551,616 addresses, so host counts are shown in full rather than as usable hosts.

You can also enter a mask

If your configuration uses a dotted mask instead of a prefix, type the address followed by the mask. Masks must be contiguous ones followed by zeros. If they aren’t, the tool says so.

All calculations happen in your browser, with no network access.

Frequently asked questions

Why are there 2 fewer usable hosts than addresses?

In IPv4, the first address identifies the network and the last is the broadcast address, so neither can be given to a device. A /26 has 64 addresses and 62 usable hosts. The exceptions are /31 (two hosts on a point-to-point link) and /32 (a single host).

What is a wildcard mask?

The mask with every bit inverted, such as 0.0.0.63 for 255.255.255.192. Cisco ACLs and OSPF configuration use it.

What does the /24 or /64 mean?

It's the prefix length, the number of bits that identify the network. The rest identify hosts. A /24 leaves 8 host bits, which is 256 addresses.

What address types does it recognise?

Private ranges (10/8, 172.16/12, 192.168/16), loopback, link-local, carrier-grade NAT, multicast, documentation ranges and public addresses, plus the equivalent IPv6 types such as unique local (fc00::/7).

Does it scan or contact the network?

No. It only does the arithmetic in your browser. Nothing is sent to the network.

Tutorials