ranjan@ranjan.info:~$ ipcalc 192.168.1.0/24

IP Subnet Calculator

Network address, broadcast, host range, wildcard mask, and binary breakdown — with network vs host bit highlighting — for any IPv4 address and CIDR prefix.

IPv4 Subnet CIDR · Decimal · Binary
/

What is a subnet calculator?

A subnet calculator takes an IPv4 address and CIDR prefix (like 192.168.1.0/24) and derives everything the notation encodes: network address, broadcast address, usable host range, subnet mask, wildcard mask, and the binary breakdown showing which bits identify the network versus the hosts. It replaces error-prone manual binary math when planning networks, writing firewall rules, or carving cloud VPCs into subnets.

Built and maintained by Ranjan Chatterjee, Infrastructure Consultant · Linux Server Specialist · free to use, no signup, no tracking

ranjan@ranjan.info:~$ faq --tool subnet-calculator

Common questions

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation appends a slash and number to an address — /24 means the first 24 bits identify the network, leaving 8 bits for hosts. It replaced the old rigid class A/B/C system, letting networks be sized to actual need: a /30 for a point-to-point link, a /16 for a campus.

How many usable hosts does a subnet have?

Two to the power of the host bits, minus two: the all-zeros address names the network and the all-ones address is broadcast. A /24 has 2⁸−2 = 254 usable hosts; a /29 has 6. The exception: /31 subnets are valid for point-to-point links (RFC 3021) with exactly two usable addresses and no broadcast.

What's the difference between the network and broadcast address?

The network address (host bits all zero) identifies the subnet itself in routing tables — it can't be assigned to a device. The broadcast address (host bits all one) reaches every host in the subnet at once. Assigning either to a machine is a classic misconfiguration that breaks connectivity in confusing ways.

Which IP ranges are private?

Three blocks are reserved for private networks (RFC 1918): 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. They're free to use internally, never routed on the public internet, and reachable outside only through NAT. The frequent gotcha is 172.16–172.31: people misread the /12 and treat all of 172.x as private.

What does a /64 mean in IPv6?

IPv6 subnets are conventionally /64 — 64 bits of network, 64 bits for hosts — which is why a single subnet holds 18 quintillion addresses. Standards like SLAAC address auto-configuration assume /64, so unlike IPv4 there's rarely a reason to subnet smaller; providers typically delegate a /48 or /56 to split into /64s.