Subnet Calculator

Calculate subnet mask, network and broadcast address, host range and CIDR for any IPv4 address. Works for /24, /16, /8 and every prefix between 0 and 32 β€” handy when planning a TP-Link, Asus, Netgear or MikroTik LAN.

Enter an IPv4 address and a CIDR prefix below. The calculator runs entirely in your browser β€” nothing is sent to our servers.

Subnet Calculator

Enter an IPv4 address and a CIDR prefix below. The calculator runs entirely in your browser β€” nothing is sent to our servers.

Subnet mask
255.255.255.0
Network address
192.168.1.0
Broadcast address
192.168.1.255
First usable host
192.168.1.1
Last usable host
192.168.1.254
Total addresses
256
Usable hosts
254

Common subnet sizes

CIDR prefixUsable hostsUse
/302Point-to-point links
/296Tiny office segments
/2814Small VLANs
/2730Departmental networks
/2662Mid-size offices
/25126Larger LANs
/24254Standard home / SOHO LAN
/23510Two adjacent /24 networks
/1665,534Whole 192.168.x.x or campus

How it works

A subnet mask splits an IPv4 address into a network portion and a host portion. CIDR notation (e.g. /24) tells you how many bits are used for the network. /24 leaves 8 host bits, which gives 256 total addresses (254 usable, since the first is the network address and the last is the broadcast address).

Common use cases

Frequently asked questions

Why does /24 give 256 addresses but only 254 usable hosts?+

A /24 reserves 2 addresses: the network address (first, e.g. 192.168.1.0) and the broadcast (last, e.g. 192.168.1.255). Every host between is usable, leaving 254.

What is CIDR notation?+

CIDR (Classless Inter-Domain Routing) writes a subnet mask as /n β€” the number of leading 1-bits. /24 means a 24-bit network prefix, equivalent to mask 255.255.255.0.

Public vs private subnet β€” does it matter for the math?+

No. The arithmetic is the same. The address class only decides whether the range is routable on the open internet (public) or stays inside your home / office network (RFC 1918 private).

Tools

SECURITY TIP

Using default passwords? Protect your network with NordVPN encryption.