Networking, IETF & Infrastructure Suite

IPv4 Subnet Mask & CIDR Calculator

Calculate network addresses, broadcast boundaries, usable IP host ranges, Cisco wildcard masks, and 32-bit binary octet allocations. 100% private and client-side.

Quick Presets:
Network ID & Subnet Scope
192.168.1.0/24
254 Usable Hosts
Usable Host Range: 192.168.1.1 - 192.168.1.254

32-Bit Binary Address Allocation

Network Bits (24) Host Bits (8)
Subnet Mask
255.255.255.0
Dotted decimal mask
Broadcast Address
192.168.1.255
Subnet broadcast target
Wildcard Mask (Cisco)
0.0.0.255
For ACLs & OSPF configs
IP Scope / Category
RFC 1918 Private
Class C Non-Routable
📋 Cisco IOS / Linux Network Configuration

Infrastructure & Security Suite: Generating secure pre-shared keys, router admin passwords, or SSH passphrases? Create hardware-random credentials with our CSPRNG Password Generator. To audit router running-config files or compare firewall ACL revisions, use our Text Diff Checker & Code Comparison Suite.

How IPv4 Subnetting Works: The Bitwise AND Operation

An Internet Protocol Version 4 (IPv4) address consists of exactly 32 binary bits partitioned into four 8-bit octets separated by dots. A router determines whether a destination IP resides on the local layer-2 broadcast domain or requires forwarding through a default gateway by executing a hardware-level Bitwise AND operation between the destination IP and the subnet mask:

IP Address (Host): 192.168.1.130 → 11000000.10101000.00000001.10000010
Subnet Mask (/24): 255.255.255.0 → 11111111.11111111.11111111.00000000
-----------------------------------------------------------------------------------
Network Address: 192.168.1.0 → 11000000.10101000.00000001.00000000 (Bitwise AND)
Broadcast Address: 192.168.1.255 → 11000000.10101000.00000001.11111111 (Host Bits = 1)

Because the first address in any standard block (all host bits set to 0) is reserved as the Network ID, and the final address (all host bits set to 1) is reserved for the Broadcast Address, the usable host capacity is calculated as:

Usable Host Capacity = 2^(32 - CIDR Prefix) - 2

Variable Length Subnet Masking (VLSM) Hierarchical Design

In enterprise network engineering, Variable Length Subnet Masking (VLSM) (RFC 1878) replaced rigid classful boundaries by allowing engineers to partition a single parent block into subnets of varying prefix lengths matched to host requirements:

Department / Tier Required Host Capacity Assigned CIDR Prefix Allocated Subnet Mask Address Efficiency
Campus Wi-Fi Users 100 Hosts /25 255.255.255.128 126 Usable IPs (26 spare)
Engineering Workstations 50 Hosts /26 255.255.255.192 62 Usable IPs (12 spare)
Server DMZ Management 12 Hosts /28 255.255.255.240 14 Usable IPs (2 spare)
Router Point-to-Point 2 Hosts /30 or /31 255.255.255.252 Zero address waste

Cloud VPC Subnet Constraints: The 5-IP Reservation Rule

When designing subnets for cloud environments (such as Amazon Web Services VPC or Microsoft Azure VNet), cloud hypervisors do not follow traditional on-premises address availability. In AWS VPC, 5 IP addresses are reserved in every subnet and cannot be assigned to instances:

  • x.x.x.0: Network address.
  • x.x.x.1: Reserved by AWS for the default VPC router gateway.
  • x.x.x.2: Reserved by AWS for the internal DNS resolver server.
  • x.x.x.3: Reserved by AWS for future functionality.
  • x.x.x.255: Network broadcast address (AWS does not support standard broadcast, but reserves the address).

Consequently, a standard /24 subnet in AWS provides 251 usable IP addresses rather than the standard on-premises 254.

RFC 1918 Private IP Address Spaces

The Internet Engineering Task Force (IETF) reserved three dedicated IPv4 blocks for private corporate networks and home local area networks (LANs). These packets are non-routable across the public Internet:

RFC 1918 Block CIDR Prefix Range Total IP Addresses Classful Equivalent & Deployment Scope
10.0.0.0/8 10.0.0.0 – 10.255.255.255 16,777,216 Class A • Enterprise data centers, Fortune 500 corporate intranets.
172.16.0.0/12 172.16.0.0 – 172.31.255.255 1,048,576 Class B • Cloud VPCs (AWS Virtual Private Cloud, Microsoft Azure).
192.168.0.0/16 192.168.0.0 – 192.168.255.255 65,536 Class C • Consumer Wi-Fi routers, home networks, small branch offices.

Universal CIDR Subnet Mask Reference Table

Quick lookup cheat sheet across standard prefix lengths:

CIDR Prefix Subnet Mask Cisco Wildcard Mask Total Addresses Usable Hosts
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342 (Traditional Point-to-Point)
/31255.255.255.2540.0.0.122 (RFC 3021 Point-to-Point)
/32255.255.255.2550.0.0.011 (Single Host / Loopback Route)

To convert between data transfer metrics, optical network speeds, and byte storage, convert values with our Scientific Notation Calculator.

Frequently Asked Questions (FAQ)

What is a Wildcard Mask and where is it used?
A Wildcard Mask is the exact inverse of a subnet mask, calculated by subtracting each octet from 255 (e.g. 255.255.255.0 becomes 0.0.0.255). In networking configuration, wildcard masks are used in Cisco IOS Access Control Lists (ACLs) and Open Shortest Path First (OSPF) routing statements to indicate which address bits must match strictly (0) and which bits are ignored (1).
What is the difference between a /30 and a /31 subnet?
Traditionally, network routers used /30 subnets (4 total IPs) for point-to-point links between two routers, leaving only 2 usable hosts because the network and broadcast addresses were discarded. RFC 3021 established /31 subnets for point-to-point links, eliminating broadcast and network address reservations to conserve IPv4 space and provide exactly 2 usable addresses.
What is an APIPA address (169.254.x.x)?
Automatic Private IP Addressing (APIPA) is a fallback protocol (169.254.0.0/16, RFC 3927) automatically self-assigned by operating systems (such as Windows and macOS) when a client interface is configured for DHCP, but no DHCP server responds to the broadcast discovery request.
Does this subnet calculator store my internal network topology?
No. All bitwise integer operations execute 100% locally in your web browser via client-side JavaScript. Urban Mixo does not record, log, or transmit proprietary internal IP addresses, subnets, or gateway configurations to any external server. Consult our Terms of Service for engineering disclaimers.