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
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 IP Addresses = 2ʰ = 2^(32 - n)Usable Host IP Range = 2ʰ - 2The subtract-2 rule accounts for the reserved Network Address (all host bits 0) and Broadcast Address (all host bits 1).
Network Address = IP Address AND Subnet MaskBroadcast Address = Network Address OR ( NOT Mask )Wildcard Mask = 255.255.255.255 - Subnet MaskMaster CIDR Subnet Mask Reference Table (/24 to /32)
| CIDR Prefix | Dotted Decimal Subnet Mask | Total IPs | Usable Host IPs | Typical Networking Deployment |
|---|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 | Standard Class C LAN; office floors, retail branch Wi-Fi |
| /25 | 255.255.255.128 | 128 | 126 | Medium departmental subnets (e.g., Engineering vs Marketing) |
| /26 | 255.255.255.192 | 64 | 62 | Isolated server clusters, DMZ server farms |
| /27 | 255.255.255.224 | 32 | 30 | Small corporate branch offices, database node replication tiers |
| /28 | 255.255.255.240 | 16 | 14 | Data center management interfaces (iLO, iDRAC, IPMI) |
| /29 | 255.255.255.248 | 8 | 6 | Public ISP multi-WAN gateway blocks, redundant firewalls |
| /30 | 255.255.255.252 | 4 | 2 | Point-to-point router interconnections (traditional WAN links) |
| /32 | 255.255.255.255 | 1 | 1 | Host 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.
- Subnet Mask from Prefix /27: 27 consecutive 1s =
11111111.11111111.11111111.11100000→ 255.255.255.224 - Host Bits (h): 32 - 27 = 5 bits
- Total Block Size: 2^5 = 32 IP addresses
- Subnet Boundary Multiples of 32: 0, 32, 64, 96, 128, 160...
- Since 138 lies between 128 and 159, the Network Address is 192.168.10.128
- First Usable Host IP: 192.168.10.128 + 1 = 192.168.10.129
- Last Usable Host IP: 192.168.10.159 - 1 = 192.168.10.158
- Broadcast Address: 128 + 32 - 1 = 192.168.10.159
- 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)