Skip to content
xmoo.app

Tool · Networking

Subnet Calculator (IPv4)

Enter an address with a prefix or subnet mask and get the network address, broadcast, the range you can give to devices, subnet mask, wildcard mask and the bits behind them. You can also split the network into smaller subnets.

For example 192.168.1.10/24 or 192.168.1.10 255.255.255.0

Network
Usable host range
Broadcast
Size
Subnet mask
Wildcard mask
Address in binary
Mask in binary
Network in binary

Split into subnets

SubnetHostsBroadcastUsable

When you need it

CIDR notation and subnet masks

An IPv4 address has 32 bits, written as four numbers from 0 to 255. The bits at the front identify the network, the ones at the back the host (the device) within that network. The prefix says where the line is drawn: /24 means the first 24 bits belong to the network. Writing it like this is called CIDR notation.

The subnet mask says the same thing another way: as many ones at the front as the prefix length, zeros after that. /24 is 255.255.255.0. The wildcard mask is the inverse (0.0.0.255) and turns up in some router and firewall rules.

A prefix /n covers 232−n addresses: 256 for a /24, 65,536 for a /16 and 16,777,216 for a /8.

How the calculator works

  1. Network address = address AND mask: every host bit is set to 0.
  2. Broadcast address = network address OR wildcard: every host bit is set to 1.
  3. Neither of the two may be given to a device. Everything in between is usable: from network address + 1 to broadcast − 1, which makes 232−n − 2 addresses.
  4. Splitting into subnets with a longer prefix m gives 2m−n networks of 232−m addresses each, one directly after the other.

Worked example

Take 192.168.1.10/24 – the address the calculator shows when you open it:

Address11000000.10101000.00000001.00001010192.168.1.10
Mask /2411111111.11111111.11111111.00000000255.255.255.0
AND → network11000000.10101000.00000001.00000000192.168.1.0
Host bits to 111000000.10101000.00000001.11111111192.168.1.255

The network has 28 = 256 addresses. Take away the network and broadcast addresses and 254 are left for devices: 192.168.1.1 to 192.168.1.254.

Split it into /26 networks and you get 22 = 4 subnets of 64 addresses, 62 of them usable: 192.168.1.0/26, 192.168.1.64/26, 192.168.1.128/26 and 192.168.1.192/26.

192.168.1.10/24 in 32 bits 1 1 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 192 168 1 10 Network part: 24 bits → /24 Host part: 8 bits → 2⁸ = 256 Split into /26: four subnets of 64 addresses, 62 usable each 192.168.1.0/26 192.168.1.64/26 192.168.1.128/26 192.168.1.192/26 Each subnet loses its network and broadcast address: 64 − 2 = 62.
The mask splits the 32 bits of the address into network and host part. A longer prefix takes bits from the host part and divides the network. Own illustration.

Special cases: /31 and /32

Typical home networks

At home, the router hands out addresses from one of the private ranges defined in RFC 1918: 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16. They cannot be reached from the internet; on the way out the router translates them to the public address of your connection (NAT).

A /24 home network has 254 usable addresses. If the public address your router reports lies in 100.64.0.0/10, you do not have a public IPv4 address of your own: that range is reserved for carrier-grade NAT at your provider (RFC 6598). The calculator points out this and other special-purpose ranges.

Limits of this tool

Privacy: the calculator runs entirely in your browser. What you enter is not sent to xmoo.app or anyone else.

Sources

Page last updated: 30 October 2026