My IP address

My IP My IPv4 My IPv6 My WAN / External IP What Is My ISP

Lookup tools

IP Lookup Speed Test IP Location Lookup IPv6 Lookup What Is My ISP My WAN / External IP DNS Lookup

Learn

FAQ What Is an IP Address? IPv4 vs IPv6 Static vs Dynamic IP How to Hide Your IP

Site

About Contact Privacy Policy Cookie Policy Terms of Use
Network maths

IP Subnet Calculator

Enter any IPv4 address with a prefix and get the network, broadcast, masks and usable host range worked out instantly. Nothing leaves your browser.

Advertisement

Subnet

Network address
Broadcast address
Netmask
Wildcard mask
CIDR notation
Address class

Hosts

First usable host
Last usable host
Usable hosts
Total addresses
Scope
Binary netmask
Advertisement

How subnetting works

An IPv4 address is 32 bits, usually written as four numbers from 0 to 255. A subnet mask splits those 32 bits into two halves: the left-hand bits identify the network, and the remaining right-hand bits identify a host inside it. The prefix length after the slash simply counts the network bits.

So 192.168.1.0/24 reserves the first 24 bits — 192.168.1 — for the network, leaving 8 bits for hosts. Eight bits give 256 combinations, of which the first is the network address and the last is the broadcast address, leaving 254 usable.

Prefix lengths at a glance

PrefixNetmaskTotal addressesUsable hosts
/30255.255.255.25242
/29255.255.255.24886
/28255.255.255.2401614
/26255.255.255.1926462
/24255.255.255.0256254
/22255.255.252.01,0241,022
/16255.255.0.065,53665,534
/8255.0.0.016,777,21616,777,214

Every step down in prefix length doubles the size of the network. That doubling is the whole of subnet arithmetic; once it clicks, the rest is bookkeeping.

Private address ranges

Three ranges are reserved for private networks and are never routed on the public internet. Your home router almost certainly uses one of them:

  • 10.0.0.0/8 — 16.7 million addresses, common in large corporate networks
  • 172.16.0.0/12 — about a million addresses, common in data centres and Docker
  • 192.168.0.0/16 — 65,536 addresses, the default for consumer routers

Devices on these ranges reach the internet through NAT, which is why every device in your house shows the same public address on the what is my IP page.

Two subnets worth knowing

A /31 has no usable hosts by the classic rule, but is deliberately used on point-to-point links where both addresses are assigned and no broadcast is needed. A /32 describes a single host exactly, and shows up constantly in firewall rules and routing tables when you want to match one address and nothing else.

Advertisement