IP Subnet Calculator

Calculate IPv4 network boundaries, CIDR prefixes, wildcard masks, usable host ranges, and binary bit masks.

Reviewed for Mathematical Accuracy Last updated: 2026

IPv4 Configuration

IP Address Binary (32-bit):
11000000.10101000.00000001.00000001
Subnet Mask Binary:
11111111.11111111.11111111.00000000

Network Allocation

Network Route (CIDR)
192.168.1.0/24
RFC 1918 Private Network
254
Usable Host IPs
Class C
Legacy Network Class
Subnet Mask 255.255.255.0
Wildcard Mask 0.0.0.255
Network ID 192.168.1.0
Broadcast IP 192.168.1.255
First Usable Host 192.168.1.1
Last Usable Host 192.168.1.254
Total Addresses 256
32-Bit CIDR Allocation
24 Net Bits 8 Host Total IPv4 Address Space: 32 Bits

IPv4 Subnet Mask & CIDR Reference Table

A breakdown of standard CIDR prefixes from /16 to /32 with total and usable host capacities:

CIDR Prefix Subnet Mask Wildcard Mask Total Addresses Usable Hosts
/32 255.255.255.255 0.0.0.0 1 1 (Single Host)
/30 255.255.255.252 0.0.0.3 4 2 (Point-to-Point)
/29 255.255.255.248 0.0.0.7 8 6
/28 255.255.255.240 0.0.0.15 16 14
/27 255.255.255.224 0.0.0.31 32 30
/26 255.255.255.192 0.0.0.63 64 62
/25 255.255.255.128 0.0.0.127 128 126
/24 255.255.255.0 0.0.0.255 256 254 (Standard LAN)
/20 255.255.240.0 0.0.15.255 4,096 4,094
/16 255.255.0.0 0.0.255.255 65,536 65,534 (Campus WAN)

How Subnetting Works Under the Hood

Every IPv4 address consists of 32 binary bits divided into four 8-bit octets. When a subnet mask is applied, a bitwise logical AND operation is performed between each bit of the IP address and each bit of the mask:

Special & Reserved IPv4 Ranges (RFC 1918 & RFC 5735)

Frequently Asked Questions

What is CIDR notation in IPv4 networking?

CIDR (Classless Inter-Domain Routing) notation represents an IP address and its associated subnet mask using a slash followed by the count of leading 1-bits in the subnet mask (e.g. 192.168.1.0/24). A /24 prefix means 24 bits are dedicated to the network ID, leaving 8 bits (254 usable addresses) for host devices.

Why are two IP addresses subtracted from the total host count?

In standard IPv4 subnets, the first IP address (all host bits set to 0) is reserved as the Network ID, and the last IP address (all host bits set to 1) is reserved as the Subnet Broadcast Address. Therefore, Usable Hosts = 2^(32 - CIDR) - 2.

What is a wildcard mask?

A wildcard mask is the bitwise inverse of a subnet mask, commonly utilized in Cisco access control lists (ACLs) and OSPF routing configurations. For example, a subnet mask of 255.255.255.0 has a wildcard mask of 0.0.0.255.

What is the difference between /30 and /31 subnets?

A /30 subnet yields 4 addresses with 2 usable host IPs (traditionally used for router-to-router point-to-point serial links). RFC 3021 introduced /31 subnets for point-to-point links, which allows both addresses to be used as host interfaces with zero network/broadcast address waste on supported modern networking equipment.

Why are private IP addresses not routable over the Internet?

RFC 1918 private IP address spaces are reserved exclusively for internal local area networks (LANs). Internet routers are explicitly configured to drop traffic originating from or destined to private address blocks. Devices communicate with public websites through Network Address Translation (NAT) gateways.