Free developer tools

CIDR Subnet Calculator

Type a network in CIDR notation and get its network address, broadcast, usable host range, masks and counts. IPv4 and IPv6, entirely in your browser.

Result

Network
192.168.1.0/24
Netmask
255.255.255.0
Wildcard mask
0.0.0.255
Broadcast address
192.168.1.255
Usable host range
192.168.1.1 – 192.168.1.254
Usable hosts
254
Total addresses
256
Netmask (binary)
11111111.11111111.11111111.00000000

How CIDR notation works

CIDR (Classless Inter-Domain Routing) writes a network as an address plus a prefix length: 192.168.1.0/24 means "the first 24 bits identify the network, the remaining 8 identify hosts inside it". Fewer prefix bits means a bigger network: each step down doubles the address count. The first address in an IPv4 block is the network address and the last is broadcast, which is why a /24 has 256 addresses but 254 usable hosts. The two exceptions are /31 (RFC 3021 point-to-point links use both addresses) and /32 (a single host route).

Common IPv4 prefix sizes

PrefixNetmaskUsable hostsTypical use
/8255.0.0.016,777,214Legacy class A block
/16255.255.0.065,534Large private network (10.x, 172.16.x)
/22255.255.252.01,022Mid-size allocation
/24255.255.255.0254The classic LAN / smallest common BGP announcement
/27255.255.255.22430Small server subnet
/29255.255.255.2486Typical ISP customer block
/30255.255.255.2522Point-to-point link (classic)
/31255.255.255.2542Point-to-point link (RFC 3021)
/32255.255.255.2551Single host route

IPv6 prefixes in practice

IPv6 uses the same notation over 128 bits, and the numbers get astronomical fast: a /64 — the standard size for a single LAN segment — contains 264 addresses. ISPs commonly delegate a /56 or /48 to a site, which is 256 or 65,536 separate /64 networks. There is no broadcast address in IPv6, so this calculator shows the first and last addresses of the block instead. It also accepts compressed forms (2001:db8::1) and expands them for you.

Where you meet CIDR when using proxies

Proxy and scraping work runs into CIDR constantly: whitelisting a provider's exit ranges in a firewall, checking whether two proxy IPs sit in the same subnet (and will be treated alike by a target site), or reading an announcement like "a /24 of dedicated IPs" and knowing that means 254 usable addresses on distinct last octets. Subnet diversity is one of the practical differences between proxy providers — addresses spread across many /24s look far less alike to rate limiters than one contiguous block.

The infrastructure behind these tools

Need proxies behind your code?

Node4 sells datacenter, residential and rotating proxies with HTTP(S) and SOCKS5 support in 170 countries. Start with free proxies, no card required.