Skip to main content

IP Subnet Calculator

Compute IPv4 subnet masks, CIDR network notation, usable host IP ranges, broadcast addresses, wildcard masks, and binary bitwise breakdowns instantaneously.

CIDR Prefix Length /24
/0 /8 /16 /24 /30 /32
Subnet Architecture Overview
Network Address
192.168.1.0/24
Subnet identifier
Usable Host Range
192.168.1.1 –
192.168.1.254
Assignable client IPs
Subnet Mask
255.255.255.0
Wildcard: 0.0.0.255
Usable Hosts
254
Total IPs: 256
32-Bit Subnet Mask Structure (Octet Breakdown)
Network Bits (24) Host Bits (8)
Subnet Boundary Address Allocation
Net: 192.168.1.0
Usable Hosts: 192.168.1.1 – 192.168.1.254 (254 IPs)
Bcast: 192.168.1.255

Comprehensive Subnet Specifications

Parameter Value / Configuration
Input IP Address 192.168.1.100
CIDR Prefix Notation /24
Subnet Mask (Dotted Decimal) 255.255.255.0
Wildcard / Inverse Mask 0.0.0.255
Network Address 192.168.1.0
Broadcast Address 192.168.1.255
First Usable Host IP 192.168.1.1
Last Usable Host IP 192.168.1.254
Total IPv4 Addresses 256 (28)
Usable Host Addresses 254 (28 − 2)
IP Class & Routing Scope Class C RFC 1918 Private
Subnet Mask (Hexadecimal) 0xFFFFFF00
In-addr.arpa Reverse DNS Zone 1.168.192.in-addr.arpa
IPv4-Mapped IPv6 Address ::ffff:192.168.1.100

Step-by-Step Bitwise Calculation Logic

Under the hood, network hardware executes binary bitwise Boolean logic at wirespeed. Here is the exact bitwise computation executed for this subnet:

  IP Address (Binary):          11000000.10101000.00000001.01100100 (192.168.1.100)
& Subnet Mask (Bitwise AND):    11111111.11111111.11111111.00000000 (255.255.255.0)
= Network Address:               11000000.10101000.00000001.00000000 (192.168.1.0)

  Network Address (Binary):      11000000.10101000.00000001.00000000 (192.168.1.0)
| Wildcard Mask (Bitwise OR):    00000000.00000000.00000000.11111111 (0.0.0.255)
= Broadcast Address:             11000000.10101000.00000001.11111111 (192.168.1.255)

IPv4 Subnet Cheat Sheet & CIDR Reference Table

CIDR Subnet Mask Wildcard Mask Total IPs Usable Hosts Common Use Case
/32255.255.255.2550.0.0.011Single host route, loopback interface
/31255.255.255.2540.0.0.122Point-to-point links (RFC 3021)
/30255.255.255.2520.0.0.342Legacy point-to-point router links
/29255.255.255.2480.0.0.786Small DMZ, ISP router blocks
/28255.255.255.2400.0.0.151614Small server farm, branch office LAN
/27255.255.255.2240.0.0.313230Departmental VLAN (30 workstations)
/26255.255.255.1920.0.0.636462Medium office subnets
/25255.255.255.1280.0.0.127128126Half-class C subnetting
/24255.255.255.00.0.0.255256254Standard local LAN / Home Wi-Fi
/23255.255.254.00.0.1.255512510Enterprise floor VLAN, DHCP pool
/22255.255.252.00.0.3.2551,0241,022Large corporate campus networks
/20255.255.240.00.0.15.2554,0964,094Cloud VPC subnet (AWS / GCP / Azure)
/16255.255.0.00.0.255.25565,53665,534Standard Cloud VPC / Class B
/8255.0.0.00.255.255.25516,777,21616,777,214Large Telco / ISP backbone / Class A

What is an IP Subnet & How Does CIDR Work?

An IPv4 address is a 32-bit integer formatted into four 8-bit octets separated by dots (e.g. 192.168.1.100). Subnetting is the practice of dividing a single physical or virtual network into smaller logical sub-networks (subnets). Every IP address is bifurcated into two distinct segments:

  • Network Portion: Identifies the specific network or subnetwork boundary. All hosts within the same subnet share the exact same network prefix.
  • Host Portion: Uniquely identifies an individual network interface or device within that subnet.

Historically, networks were divided into rigid classes (Class A, B, and C). In 1993, the Internet Engineering Task Force (IETF) introduced Classless Inter-Domain Routing (CIDR) via RFC 1519 (updated by RFC 4632) to eliminate address depletion and enable flexible prefix lengths designated by a slash followed by the number of network bits (such as /24).

Why Subnetting is Essential for Modern Network Architecture

  • Broadcast Domain Containment: Ethernet switches forward broadcast frames (such as ARP requests) to every port in the broadcast domain. Without subnetting, thousands of devices flooding broadcasts degrade network performance (broadcast storms).
  • Network Security & Segmentation: By partitioning networks into distinct subnets (e.g., Guest Wi-Fi, Corporate LAN, IoT Devices, Database Tier), network engineers can apply Access Control Lists (ACLs) and firewall inspection policies between subnets.
  • Optimized Routing Tables: Route summarization (supernetting) allows edge routers to advertise one consolidated CIDR prefix rather than hundreds of individual routes, reducing routing table memory and convergence latency across the Internet backbone.
  • Cloud VPC Planning: Cloud platforms like AWS, Google Cloud, and Microsoft Azure require architecting Virtual Private Clouds (VPCs) with non-overlapping subnets across multiple availability zones.

How to Calculate Subnets Manually: Key Mathematical Formulas

To calculate subnet boundaries manually or programmatically, apply these universal formulas where n represents the CIDR prefix length (number of network bits), and h = 32 − n represents the host bits:

  • Total Addresses: Total = 2h = 2(32 − n)
  • Usable Hosts (Standard /0 to /30): Usable = 2h − 2. We subtract 2 because the very first address represents the Network Identifier and the last address is reserved for the Subnet Directed Broadcast.
  • RFC 3021 Exception (/31): Point-to-point links have exactly 2 total addresses, and both are usable hosts (usable = 2). Broadcast and network identifiers are omitted to conserve IPv4 space.
  • Single Host (/32): Represents an explicit interface route or loopback interface with exactly 1 usable address (usable = 1).
  • Wildcard Mask: The bitwise complement (inverse) of the subnet mask, calculated as 255.255.255.255 − Subnet Mask. Used extensively in Cisco ACLs and OSPF area configurations.

Frequently Asked Questions (FAQ)

What is the difference between /24 and /23 subnets?
A /24 subnet has 24 network bits and 8 host bits, providing 256 total IP addresses and 254 usable host addresses (256 - 2). A /23 subnet borrows one network bit, giving 9 host bits. This doubles the capacity to 512 total IP addresses and 510 usable hosts, effectively merging two contiguous /24 blocks into a single broadcast domain.
What are RFC 1918 Private IP Address ranges?
RFC 1918 reserves three address blocks strictly for internal private enterprise networks that are non-routable on the public global Internet:
  • 10.0.0.0 to 10.255.255.255: 10.0.0.0/8 (16,777,216 addresses)
  • 172.16.0.0 to 172.31.255.255: 172.16.0.0/12 (1,048,576 addresses)
  • 192.168.0.0 to 192.168.255.255: 192.168.0.0/16 (65,536 addresses)
Devices on these private networks communicate with the Internet using Network Address Translation (NAT).
Why can't I use the first and last IP address in a standard subnet?
In standard IPv4 subnets (/0 through /30), the first address (where all host bits are binary 0s) represents the Network Address, identifying the wire itself. The last address (where all host bits are binary 1s) is the Directed Broadcast Address, used to deliver packets to all hosts on that local subnet simultaneously. Assigning either to an individual client NIC causes ARP and routing conflicts.
How does a /31 subnet work without a network or broadcast address?
Defined under RFC 3021, /31 subnets are designated specifically for point-to-point router links where exactly two endpoints exist. Because there are no other hosts on the physical wire, broadcast packets and network identification are unnecessary, allowing network engineers to conserve billions of IPv4 addresses on backbone transit links.
What is a Wildcard Mask and where is it used?
A wildcard mask is the exact inverted binary representation of a subnet mask (where 0 indicates an exact bit match and 1 indicates "don't care"). For example, a /24 subnet mask of 255.255.255.0 has a wildcard mask of 0.0.0.255. Wildcard masks are primarily used in Cisco IOS Access Control Lists (ACLs) and dynamic routing protocols like OSPF and EIGRP to filter traffic.
Standard Compliance & Regulatory Disclaimer: This IP Subnet Calculator complies with Internet Engineering Task Force (IETF) RFC specifications including RFC 791 (Internet Protocol), RFC 950 (Internet Standard Subnetting Procedure), RFC 1918 (Address Allocation for Private Internets), RFC 3021 (Using 31-Bit Prefixes on IPv4 Point-to-Point Links), and RFC 4632 (Classless Inter-domain Routing). Calculation results are provided for network architecture design, verification, and instructional reference.
✓ Copied to Clipboard!