BrowserTools
Advertisement
Home / Networking / IP Subnet Calculator (CIDR / IPv4)

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?
Nothing. All subnet calculations run entirely in your browser using client-side JavaScript. No IP addresses, CIDR blocks, or any other input you enter are transmitted to our servers. The tool works fully offline once the page has loaded.
What is CIDR notation and why is it used?
CIDR (Classless Inter-Domain Routing) notation represents a range of IP addresses as a base address and a prefix length, such as 10.0.0.0/8. The prefix length indicates how many leading bits are fixed (the network portion); the remaining bits identify individual hosts within that network. CIDR replaced the older Class A/B/C system in 1993 (RFC 1519) because the class-based system could only allocate blocks of 16 million, 65,536, or 256 addresses, creating enormous waste. CIDR allows arbitrary power-of-two block sizes, enabling much more efficient address allocation.
How do I know if two IP addresses are on the same subnet?
Apply the subnet mask to both IP addresses using a bitwise AND operation — if the results are identical, they are on the same network and can communicate directly without a router. For example, 192.168.1.50 and 192.168.1.200 are both in 192.168.1.0/24 (both AND with 255.255.255.0 give 192.168.1.0), so they are on the same subnet. 192.168.1.50 and 192.168.2.50 are in different /24 subnets and require a router or layer-3 switch to communicate.
What is the difference between the network address and the broadcast address?
The network address is the lowest IP in the block — it has all host bits set to 0 — and is used to identify the network itself in routing tables and configuration. The broadcast address is the highest IP in the block — all host bits set to 1 — and packets sent to it are delivered to every host on the segment. Neither address can be assigned to a host interface. In a /24, the network address is x.x.x.0 and the broadcast is x.x.x.255.
Are there rate limits on this calculator?
No. Because all calculations run client-side in JavaScript, there are no server requests and therefore no rate limits of any kind. You can calculate as many subnets as you need instantly, without any throttling or usage caps.
How does this compare to using 'ipcalc' in a terminal?
The 'ipcalc' command on Linux/macOS performs exactly the same calculations and produces similar output. This web tool provides the same results with a visual interface, no installation required, and is accessible from any device including phones and tablets where installing terminal tools is impractical. For scripted or automated subnet calculations, 'ipcalc' or Python's 'ipaddress' module are more appropriate.
What is subnetting and why do networks use it?
Subnetting divides a larger IP address block into smaller, contiguous sub-blocks. It is used to segment networks for security (isolating servers from workstations), to reduce broadcast domain size (broadcasts in a /16 would reach 65,534 hosts, creating noise), to enforce traffic policies at router boundaries, and to organise networks logically (one subnet per department, per floor, or per service tier). Cloud providers use subnetting extensively to create isolated VPC segments with different routing and security policies.
Does this tool support IPv6?
Not currently — only IPv4 CIDR calculations are supported. IPv6 subnetting follows the same prefix-length logic but with 128-bit addresses, so /48 through /64 are the most common allocation sizes. IPv6 support may be added in a future update. For IPv6 subnet calculations in the meantime, tools like 'sipcalc' or online IPv6 calculators are available.
What are /31 and /32 subnets used for?
A /32 represents a single host address with no network or broadcast — it is used to create a host route in a routing table, assign a loopback address, or identify a specific server in a firewall rule. A /31 contains exactly two addresses and is defined for point-to-point links in RFC 3021, allowing both addresses to be used as host addresses (no network or broadcast waste), which is useful on router interconnects where every address counts.
What is a wildcard mask and where is it used?
A wildcard mask is the bitwise inverse of a subnet mask: where the subnet mask has a 1 bit, the wildcard has a 0 (fixed bit), and vice versa. It is used in Cisco IOS access control lists (ACLs) and OSPF network statements to specify which bits of an address must match. For a /24 network, the subnet mask is 255.255.255.0 and the wildcard mask is 0.0.0.255 — meaning the first three octets must match exactly and the last octet can be anything. Wildcard masks are more flexible than prefix lengths because they can specify non-contiguous bit patterns.

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.

Advertisement