ZapKit

Subnet calculator

Enter an IP address and prefix to see which network it belongs to, how many hosts fit, and every address you need for configuration.

What is a subnet calculator?

A subnet calculator works out the details of an IPv4 network from an address and prefix length. Network engineers, system administrators and students use it to plan address ranges, configure routers and firewalls, and check that two devices are on the same network.

Enter an address with a prefix or dotted subnet mask to get the network in CIDR notation, the first and last usable host and how many there are, the broadcast address, subnet and wildcard masks, total addresses, address class and type. A table shows the address, mask, network and broadcast in binary, which makes the arithmetic visible.

How to use the Subnet calculator

  1. 1.Enter an address

    Like 192.168.10.77, or paste CIDR notation such as 10.0.0.0/8.

  2. 2.Enter the prefix or mask

    /26, 26 or 255.255.255.192 all work.

  3. 3.Read the results

    Network, hosts, broadcast, masks and the binary breakdown.

Example: 192.168.10.77/26

A device on a small office network:

Network
192.168.10.64/26
Usable hosts
62: 192.168.10.65 – 192.168.10.126
Broadcast
192.168.10.127
Mask / wildcard
255.255.255.192 / 0.0.0.63

Any device from .65 to .126 is on the same network without a router in between.

How a subnet is worked out

The prefix says how many leading bits identify the network; the rest number the hosts. A /26 leaves 6 host bits, so the block holds 2⁶ = 64 addresses. The network address has all host bits set to 0, the broadcast address all set to 1, and the usable hosts sit between them.

Two prefixes are special. A /31 is used for point-to-point links and both of its addresses are usable, as RFC 3021 allows; a /32 is a single host. The address type shows whether it's private, public, loopback, link-local, carrier-grade NAT or reserved for documentation.

Frequently asked questions

What is a wildcard mask?

The mask inverted: 0.0.0.63 for a /26. Cisco access lists and OSPF use it.

Why are there 2 fewer usable hosts than addresses?

The first address names the network and the last is the broadcast address, so neither can be given to a device.

Can I enter a mask like 255.255.0.255?

No. Subnet masks must be ones followed by zeros, so that mask is invalid.

Does it support IPv6?

Use the IPv6 calculator for IPv6 prefixes.

More Developer tools