IP Subnet Calculator (CIDR / IPv4)
Calculate network address, broadcast, mask, host range and total hosts from any IPv4 CIDR notation.
Loading IP Subnet Calculator (CIDR / IPv4)… If nothing happens, please enable JavaScript.
Frequently asked questions
What data does this tool send to your servers?
What is CIDR notation and why is it used?
How do I know if two IP addresses are on the same subnet?
What is the difference between the network address and the broadcast address?
Are there rate limits on this calculator?
How does this compare to using 'ipcalc' in a terminal?
What is subnetting and why do networks use it?
Does this tool support IPv6?
What are /31 and /32 subnets used for?
What is a wildcard mask and where is it used?
About IP Subnet Calculator (CIDR / IPv4)
CIDR (Classless Inter-Domain Routing) is the standard notation for expressing IPv4 network blocks, written as an IP address followed by a slash and the number of fixed network bits — for example, 192.168.1.0/24. The prefix length (the number after the slash) determines how many IP addresses are in the block: /24 contains 256 addresses, /16 contains 65,536, and /8 contains over 16 million. Before CIDR was introduced in 1993, IPv4 routing used a rigid Class A/B/C system that wasted enormous portions of the address space. CIDR made it possible to allocate address blocks of any size, dramatically slowing the exhaustion of the IPv4 address pool and simplifying internet routing tables.
Network engineers reach for a subnet calculator every time they are designing network topology, segmenting a corporate network into VLANs, configuring firewall rules, or setting up cloud Virtual Private Cloud (VPC) networks. Understanding subnetting is essential for tasks like dividing a /24 office network into separate /26 segments for different departments, calculating whether two IP addresses are in the same subnet (and therefore reachable without a router), or sizing a cloud subnet to have enough addresses for a planned number of servers while leaving room for growth. DevOps engineers use CIDR notation constantly in infrastructure-as-code tools like Terraform and AWS CloudFormation.
This calculator parses any IPv4 CIDR block or IP-plus-subnet-mask combination and instantly computes every useful network parameter: the network address (the block identifier), the broadcast address (the all-hosts address), the subnet mask in dotted-decimal notation, the wildcard mask (the inverse of the subnet mask, used in Cisco ACL syntax), the first and last usable host IP addresses, and the total count of IP addresses in the block. All computation runs locally in your browser — nothing is sent to our servers. There are no rate limits.
When working with subnets, keep a few key relationships in mind. The number of usable host addresses in a /n block is 2^(32-n) minus 2 (subtracting the network and broadcast addresses). A /24 gives 254 usable hosts; a /25 gives 126; a /26 gives 62. Halving the block size by adding one to the prefix costs you roughly half the address space. The 'wildcard mask' shown in the results is the bit-inverse of the subnet mask and is used in Cisco IOS access control lists and OSPF area configurations. The network address and broadcast address are not assignable to hosts — attempting to assign them causes routing confusion.
How CIDR Saved the Internet from Running Out of Addresses (For a While)
In the early 1990s, it became clear that the internet was heading for a routing table crisis. The class-based addressing system (Class A for large organisations, Class B for medium ones, Class C for small ones) was forcing route table entries to multiply faster than router hardware could handle, and the allocation rules meant that a company needing 300 addresses would receive an entire Class B block of 65,536 — wasting 65,200 addresses. At the current growth rate, the entire BGP routing table would overwhelm every router on the internet within a few years. The solution, CIDR, was proposed in RFC 1518 and RFC 1519 in 1993 by Vince Fuller, Tony Li, Jessica Yu, and Kannan Varadhan.
CIDR solved two problems simultaneously. By allowing any prefix length instead of just /8, /16, and /24, it enabled allocations sized correctly for each organisation's actual need. By grouping contiguous blocks under a single route advertisement (called supernetting or route aggregation), it allowed ISPs to announce one /16 route instead of 256 /24 routes to their customers, collapsing routing tables dramatically. The technique of aggregating smaller routes into larger ones is still fundamental to how internet routing scales today — without it, the global BGP routing table would contain hundreds of millions of entries instead of the roughly one million entries routers handle today.
The private address ranges defined in RFC 1918 — 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 — were designated alongside CIDR as address space that could be reused freely behind NAT devices without being routable on the public internet. The 192.168.x.x range in particular has become universally familiar as the default home and small office network range, appearing on virtually every home router in the world. These three ranges together provide over 17.9 million private addresses that billions of devices share simultaneously through NAT, multiplying the effective address space far beyond the 4.3 billion public IPv4 addresses that actually exist.