Skip to content

Free tool

Subnet calculator (IPv4 CIDR)

Enter an IPv4 address with a prefix or mask to get the network, broadcast, usable host range, number of hosts and masks.

Address and prefix

IPv4. Enter CIDR (10.0.0.0/16) or a mask (10.0.0.1 255.255.0.0).

Subnet

Network
192.168.1.0/24
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Broadcast
192.168.1.255
Usable hosts
192.168.1.1 – 192.168.1.254
Number of hosts
254 usable of 256
Class
C
Private range (RFC 1918)
Yes

Reading CIDR notation

10.0.0.0/16 means the first 16 bits are the network and the remaining 16 bits number the hosts. Each bit you add to the prefix halves the network: a /24 has 256 addresses, a /25 has 128, a /30 has 4. Two addresses in each subnet are reserved, the network address (all host bits 0) and the broadcast (all host bits 1), so a /24 has 254 usable hosts. /31 (point-to-point links) and /32 (a single host) are exceptions.

Private ranges

RFC 1918 reserves three ranges for private networks: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. They are not routed on the internet. Cloud VPCs, Kubernetes pod and service networks and home routers all use them; when two networks you connect with a VPN or peering use overlapping ranges, traffic goes to the wrong place, so plan ranges before you build.

Common sizes

PrefixMaskAddressesTypical use
/16255.255.0.065,536A whole VPC
/20255.255.240.04,096A large subnet
/24255.255.255.0256A typical subnet
/28255.255.255.24016Small subnets, load balancers
/32255.255.255.2551One host in a firewall rule

Check whether a host in a range is reachable with the port checker.

Using it safely at work

Online developer tools are a common way secrets leak: people paste production tokens, customer records or private keys into a website that quietly logs them. This page does all its work in your browser with standard Web APIs, makes no network request with your input, and stores nothing, so it is safe to use with real data, and you can confirm that in your browser’s network panel. Even so, treat anything you paste as you would treat a screenshot: rotate a token that was exposed, never share links that contain it, and prefer command-line tools on the server itself for very sensitive material.

Frequently asked questions

Is my data sent to a server?

No. This tool runs entirely in your browser; nothing you paste is uploaded or stored.

How many hosts are in a /24?

256 addresses, 254 usable.

What is a wildcard mask?

The inverse of the subnet mask, used by some routers and ACLs.

Does it support IPv6?

Not yet; this calculator is for IPv4.

How do I split a /24 into smaller subnets?

Each extra prefix bit halves it: two /25s, four /26s or eight /27s.

More free tools

All tools