🌐 100% Client-Side — Instant Subnet Parsing

Subnet Calculator & CIDR Analyzer

Enter any IP address and CIDR prefix to get the subnet mask, network address, usable host range, broadcast address, wildcard mask, and a binary breakdown. Instant, private, free.

Subnet Mask
—
Network Address
—
Usable Host Range
—
Broadcast Address
—
Usable Hosts
—
Wildcard Mask
—

Binary Visualization

IP Address: —
Subnet Mask: —
Network Addr: —
Broadcast Addr: —

Understanding IPv4 Subnetting & CIDR Notation

Subnetting is the practice of dividing a physical network into multiple logical sub-networks (subnets). In modern networking, this partitioning is essential for conserving IP address ranges, optimizing routing efficiency, and enforcing security policies. Without subnetting, all devices connected to an organization's network would inhabit the same broadcast domain, leading to excessive network congestion and security vulnerabilities.

An IPv4 address consists of 32 bits, divided into four octets of 8 bits each, usually written in dotted-decimal format (e.g., 192.168.1.1). Subnetting works by taking bits from the host portion of an IP address and utilizing them to identify the specific subnet. This division is defined by a subnet mask, which dictates which portion of the address belongs to the network routing path and which belongs to the individual device (host).

The Shift from Classful Routing to CIDR

In the early days of the internet, IP addresses were allocated in strict classes (Class A, B, and C). Class A networks used a default 8-bit mask (/8), allowing for over 16 million host addresses. Class B used a 16-bit mask (/16) with 65,534 hosts, and Class C used a 24-bit mask (/24) supporting 254 hosts. This system was highly inefficient. An organization needing 500 IP addresses would be forced to request a Class B network block, wasting over 65,000 potential IP addresses.

To solve this scaling crisis, Classless Inter-Domain Routing (CIDR) was introduced in 1993. CIDR allows subnet masks to be partitioned at any bit boundary, rather than just 8-bit octet increments. A network prefix is denoted with a slash followed by the number of network bits (e.g., 192.168.1.0/25). This slash number represents the network mask. For example, a /25 network borrows one bit from the fourth octet, splitting a standard /24 network block into two distinct subnets, each offering 126 usable host addresses.

How to Calculate a Subnet Manually

Manual subnetting calculations require converting dotted-decimal IP addresses into binary form, performing bitwise operations, and converting back to decimal. Here are the core metrics calculated by this tool:

By understanding binary alignment, network engineers can easily calculate block sizes and design robust network architectures suited for secure, modern enterprise operations.

Related Developer Resources

How to Use This Subnet Calculator

  1. Enter an IP address. Any IPv4 address works, for example 192.168.1.100. It does not need to be the network address; the tool masks it automatically.
  2. Pick a CIDR prefix. Use the dropdown to select anything from /8 to /32. Common picks: /24 for a LAN, /30 for a point-to-point link, /32 for a single host.
  3. Read the results. The subnet mask, network address, usable host range, broadcast address, usable host count, and wildcard mask appear instantly, with a binary visualization below.
  4. Plan your subnets. Borrow bits from the host portion to split a block. A /24 splits into two /25s (126 hosts each), four /26s (62 each), or eight /27s (30 each).

Who Uses a Subnet Calculator

Network engineers use it daily when carving up address space for VLANs, planning new sites, or writing firewall rules. Students studying for CCNA or Network+ use it to check their manual subnetting homework. Homelab builders use it to segment IoT devices, guests, and servers on separate subnets. Cloud engineers reach for it when sizing VPC subnets on AWS, Azure, or GCP, where picking the wrong prefix means rebuilding the network later.

Frequently Asked Questions

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation writes an IP address followed by a slash and a prefix length, like 192.168.1.0/24. The number counts how many of the 32 bits belong to the network portion. It replaced the old class A, B, and C system in 1993 because fixed classes wasted huge blocks of address space.

How many usable hosts does a /24 subnet have?

256 total addresses, minus the network address and the broadcast address, leaves 254 usable hosts. That is why /24 is the most common size for a single office LAN or VLAN.

What is the difference between a subnet mask and a CIDR prefix?

They carry the same information in different formats. A subnet mask like 255.255.255.0 in dotted decimal equals CIDR prefix /24, which counts the 24 leading 1-bits in that mask. CIDR is compact; dotted-decimal masks are still common in router configurations.

What is a wildcard mask and when do I use it?

A wildcard mask is the bitwise inverse of a subnet mask: where the mask has 1s (network bits), the wildcard has 0s. For /24 the wildcard is 0.0.0.255. Cisco access control lists and OSPF network statements use wildcard masks. A 0 bit means the address bit must match; a 1 bit means any value is allowed.

What is the difference between the network and broadcast address?

The network address is the first address in a subnet (all host bits zero) and identifies the subnet itself. The broadcast address is the last address (all host bits one) and sends packets to every device on the subnet. Neither can be assigned to a device.

How do I calculate the number of hosts in a subnet?

Take 2 to the power of the host bits, then subtract 2. Host bits are 32 minus the prefix, so a /26 has 6 host bits: 2^6 = 64, minus 2 = 62 usable hosts. The calculator above does this instantly for any prefix.

Related Network Tools

UUID Generator Generate secure random UUIDs for network tokens. Base64 Encoder/Decoder Encode or decode network requests using Base64. Regex Tester Validate network IP matches with regex parameters.