Free tool · Runs in your browser

CIDR / Subnet Calculator

Enter an IPv4 address and prefix (like 10.0.0.0/24) to instantly get the network and broadcast address, usable host range and count, subnet mask, and wildcard mask. Runs entirely in your browser.

Prefix length/24
/0/16/32
Examples
Network address10.0.0.0
Broadcast address10.0.0.255
Usable host range10.0.0.1 - 10.0.0.254
Usable hosts254
Total addresses256
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
CIDR notation10.0.0.0/24
IP classA
TypePrivate (RFC 1918)
IP (binary)00001010.00000000.00000000.00000000
Mask (binary)11111111.11111111.11111111.00000000
Copy summary
CIDR: 10.0.0.0/24
Network: 10.0.0.0
Broadcast: 10.0.0.255
Host range: 10.0.0.1 - 10.0.0.254
Usable hosts: 254
Subnet mask: 255.255.255.0
Wildcard mask: 0.0.0.255
Type: Private (RFC 1918)

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation writes an IP network as an address followed by a slash and a prefix length - for example 10.0.0.0/24. The prefix is the number of leading bits that make up the network portion of the address; the remaining bits identify hosts within that network.

A /24 means the first 24 bits are the network, leaving 8 bits for hosts - which is 256 addresses, or 254 usable ones. The smaller the prefix number, the bigger the network.

How subnet masks work

A subnet mask is the prefix expressed as a dotted-decimal number. A /24 prefix is the mask 255.255.255.0 - in binary, 24 ones followed by 8 zeros. The ones mark the network bits and the zeros mark the host bits.

The device finds the network address by performing a bitwise AND of the IP and the mask. The wildcard mask is the inverse (0.0.0.255 for a /24) and is used in router access-control lists and OSPF, where the bits to ignore are the ones set.

Network, broadcast, and the usable range

Every subnet reserves two addresses: the network address (all host bits 0, the first address) identifies the subnet itself, and the broadcast address (all host bits 1, the last address) reaches every host at once. Everything in between is assignable to devices, which is why usable hosts equals total addresses minus two.

Two exceptions: a /31 has no broadcast and gives 2 usable addresses for point-to-point links (RFC 3021), and a /32 is a single host - useful for firewall rules and routes.

Public vs private IP ranges

Some ranges are reserved for private networks (RFC 1918) and are never routed on the public internet: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. The calculator labels each address as private, public, loopback, link-local, or another special-use type so you know what you are looking at.

How to use this calculator

  1. Type an IPv4 address with a prefix, like 192.168.1.0/24, or just an address.
  2. Drag the prefix slider to resize the network and watch every value update live.
  3. Read off the network, broadcast, usable range, host count, mask, and wildcard.
  4. Copy any single value, or copy the whole summary at once.

Common subnet sizes

PrefixSubnet maskAddressesUsable hosts
/30255.255.255.25242
/29255.255.255.24886
/28255.255.255.2401614
/27255.255.255.2243230
/26255.255.255.1926462
/25255.255.255.128128126
/24255.255.255.0256254
/16255.255.0.065,53665,534
/8255.0.0.016,777,21616,777,214
CIDR & subnet FAQ

Frequently asked questions

The /24 is the CIDR prefix length: the first 24 bits are the network portion and the remaining 8 bits are for hosts. That equals a subnet mask of 255.255.255.0, 256 total addresses, and 254 usable host addresses (after reserving the network and broadcast addresses).
For a given prefix, total addresses = 2^(32 - prefix), and usable hosts = total minus 2 (the network and broadcast addresses). For example a /26 has 2^6 = 64 addresses and 62 usable hosts. The exceptions are /31 (2 usable, for point-to-point links) and /32 (a single host).
A subnet mask (e.g. 255.255.255.0) marks the network bits with ones. A wildcard mask is its inverse (0.0.0.255) and marks the bits to ignore with ones. Subnet masks are used to define networks; wildcard masks appear in Cisco access-control lists and OSPF configuration.
RFC 1918 reserves three ranges for private networks: 10.0.0.0/8 (10.0.0.0-10.255.255.255), 172.16.0.0/12 (172.16.0.0-172.31.255.255), and 192.168.0.0/16 (192.168.0.0-192.168.255.255). These are not routable on the public internet and are used behind NAT.
The network address is the first address in a subnet (all host bits 0) and names the subnet itself. The broadcast address is the last address (all host bits 1) and sends to every host in the subnet at once. Neither can be assigned to a device, so they are excluded from the usable host count.
A /32 is a single IP address (one host) - handy for firewall rules and host routes. A /31 covers two addresses and, under RFC 3021, both are usable for point-to-point links since no broadcast address is needed. Standard subnets (/30 and larger) reserve the network and broadcast addresses.
From subnets to servers

Manage every host across every network.

Once your subnets are planned, CtrlOps gives you one dashboard for the servers on them - SSH, monitoring, and deployment for your whole fleet, with credentials encrypted on your own machine.

Start instantly· No credit card· No sneaky autorenewals