Calculay

IP Subnet Calculator

Enter an IPv4 address and CIDR prefix to calculate your network's broadcast address, wildcard mask, and total usable host range.

IPv4 Subnet Calculator

/24
/1/32

Network Address

192.168.1.0

Broadcast Address

192.168.1.255

Usable Host Range

192.168.1.1 - 192.168.1.254

Total Usable Hosts

254

Subnet Mask

255.255.255.0

Wildcard Mask

0.0.0.255

IP Class

Class C

CIDR Notation

/24

Binary IP

11000000.10101000.00000001.00000001

Binary Mask

11111111.11111111.11111111.00000000

IP Subnet Calculator: IPv4 Addressing, CIDR Prefixes, Subnet Masks & Network Math

In computer networking and systems architecture, subnetting is the practice of logically partitioning a physical IPv4 address space into smaller, isolated broadcast domains. Formatted as 32-bit unsigned integers partitioned into four 8-bit octets (X.X.X.X), IPv4 addresses are scarce and structurally vulnerable to broadcast storms on flat enterprise topologies. By deploying Classless Inter-Domain Routing (CIDR) masks (RFC 1519/4632), network engineers optimize routing table efficiency, enforce firewall security zones, and prevent IP address exhaustion. The Calculay IP Subnet Calculator computes network IDs, broadcast addresses, subnet masks, wildcard masks, and usable host address scopes.

The Core Mathematical Formulations

In any IPv4 CIDR block denoted as IP/n, the 32 bits are divided into n network bits and h = 32 - n host bits:

Total & Usable AddressesTotal IP Addresses = 2ʰ = 2^(32 - n)Usable Host IP Range = 2ʰ - 2

The subtract-2 rule accounts for the reserved Network Address (all host bits 0) and Broadcast Address (all host bits 1).

Bitwise Logic (Network ID & Broadcast)Network Address = IP Address AND Subnet MaskBroadcast Address = Network Address OR ( NOT Mask )Wildcard Mask = 255.255.255.255 - Subnet Mask

Master CIDR Subnet Mask Reference Table (/24 to /32)

CIDR PrefixDotted Decimal Subnet MaskTotal IPsUsable Host IPsTypical Networking Deployment
/24255.255.255.0256254Standard Class C LAN; office floors, retail branch Wi-Fi
/25255.255.255.128128126Medium departmental subnets (e.g., Engineering vs Marketing)
/26255.255.255.1926462Isolated server clusters, DMZ server farms
/27255.255.255.2243230Small corporate branch offices, database node replication tiers
/28255.255.255.2401614Data center management interfaces (iLO, iDRAC, IPMI)
/29255.255.255.24886Public ISP multi-WAN gateway blocks, redundant firewalls
/30255.255.255.25242Point-to-point router interconnections (traditional WAN links)
/32255.255.255.25511Host loopback addresses (BGP router IDs, individual VPN tunnels)

Step-by-Step Worked Subnet Calculation

Problem: Determine the network parameters for host IP 192.168.10.138/27.

  1. Subnet Mask from Prefix /27: 27 consecutive 1s = 11111111.11111111.11111111.11100000 → 255.255.255.224
  2. Host Bits (h): 32 - 27 = 5 bits
  3. Total Block Size: 2^5 = 32 IP addresses
  4. Subnet Boundary Multiples of 32: 0, 32, 64, 96, 128, 160...
  5. Since 138 lies between 128 and 159, the Network Address is 192.168.10.128
  6. First Usable Host IP: 192.168.10.128 + 1 = 192.168.10.129
  7. Last Usable Host IP: 192.168.10.159 - 1 = 192.168.10.158
  8. Broadcast Address: 128 + 32 - 1 = 192.168.10.159
  9. Total Usable Hosts: 32 - 2 = 30 Hosts

RFC 1918 Private Non-Routable IP Standards

To preserve public IP addresses, the Internet Engineering Task Force (IETF) designated three private IPv4 blocks reserved for internal enterprise use behind Network Address Translation (NAT):

  • 10.0.0.0/8: 10.0.0.0 – 10.255.255.255 (16,777,216 total addresses; large enterprise networks & AWS/GCP VPCs)
  • 172.16.0.0/12: 172.16.0.0 – 172.31.255.255 (1,048,576 total addresses; medium corporate data centers)
  • 192.168.0.0/16: 192.168.0.0 – 192.168.255.255 (65,536 total addresses; universal home Wi-Fi routers & small offices)