IPv4 Subnet Calculator - Calculate Subnets, CIDR & Wildcard Masks Online

Published July 14, 2021

Use this free IPv4 Subnet Calculator to calculate network IDs, usable host ranges, broadcast addresses, Cisco wildcard masks, CIDR notation, and 32-bit binary bitmaps in seconds. Enter any IPv4 address with CIDR notation (like 192.168.1.10/24) or an IP + Subnet Mask (like 10.0.0.1 255.255.0.0), or use the interactive slider and VLSM splitter below.

1. IPv4 Subnet Calculator

Class Presets:
Quick CIDR:
Network / Subnet ID
192.168.1.0/24
Usable Host Range
192.168.1.1 – 192.168.1.254
Subnet Mask
255.255.255.0
Wildcard Mask (Cisco ACL / OSPF)
0.0.0.255
Broadcast Address
192.168.1.255
Host Capacity & Scope
254 usable (256 total)
Class C · Private (RFC 1918)

2. Binary Bit Breakdown

Network bits (n) Subnet bits (s) Host bits (h)
IPv4 Binary:
Mask Binary:
Bit Map:

3. Subnet Splitter (VLSM Practice)

Divide the active network block into smaller subnets to plan VLANs, Kubernetes pod CIDRs, or point-to-point router links:

SubnetUsable Host RangeBroadcastUsable Hosts

4. Complete CIDR Reference Table (/1 to /32)

Click any row below to load that CIDR subnet mask directly into the calculator above.

CIDRSubnet MaskWildcard MaskTotal IPsUsable Hosts

5. Subnetting Formulas & Worked Examples

Understanding how IPv4 subnetting works behind the scenes helps when configuring routers, firewalls, and cloud VPCs (or studying for CCNA):

  • Total IP addresses: 2^(32 - CIDR)
  • Usable host IPs: 2^(32 - CIDR) - 2 (subtracting the Network ID and Broadcast address for prefixes /0 through /30)
  • Wildcard mask (inverse mask): Subtract each octet of the subnet mask from 255 (e.g., 255.255.255.255 - 255.255.255.192 = 0.0.0.63)

Example A: Splitting a /24 Office Network into /26 VLANs

Suppose you start with 192.168.10.0/24 and need 4 department VLANs with up to 62 hosts each. Borrowing 2 host bits moves the mask from /24 to /26 (255.255.255.192, block size 64):

  • VLAN 10: 192.168.10.0/26 (Usable: .1 – .62, Broadcast: .63)
  • VLAN 20: 192.168.10.64/26 (Usable: .65 – .126, Broadcast: .127)
  • VLAN 30: 192.168.10.128/26 (Usable: .129 – .190, Broadcast: .191)
  • VLAN 40: 192.168.10.192/26 (Usable: .193 – .254, Broadcast: .255)

Example B: Point-to-Point Router Links (/30 vs /31)

For a link between two routers, a /30 (255.255.255.252) provides 2 usable host IPs out of 4 total addresses. Modern routers also support /31 (RFC 3021), which uses both addresses on a point-to-point link with no wasted IPs.

6. Frequently Asked Questions (FAQ)

What is the difference between a Subnet Mask and CIDR notation?

They represent the exact same network boundary in two formats. Dotted-decimal subnet masks (such as 255.255.255.0) write out all four octets, while CIDR notation (/24) simply counts how many consecutive leading bits are set to 1.

How do you calculate usable hosts in an IPv4 subnet?

Count the remaining host bits (32 - CIDR) and compute 2^host_bits - 2. Two addresses are reserved: the first address is the Network ID and the last address is the Broadcast address. For example, a /26 leaves 6 host bits, giving 2^6 - 2 = 62 usable hosts.

What is a Wildcard Mask used for?

A wildcard mask is the bitwise inverse of a subnet mask (for example, 0.0.0.255 for 255.255.255.0). It is used in Cisco IOS Access Control Lists (ACLs), OSPF network statements, and EIGRP configurations to specify which IP bits must match (0) and which bits are ignored (1).

Why are /31 and /32 subnets special?

A /32 (255.255.255.255) identifies a single host IP address, commonly used for loopback interfaces, firewall host rules, and static routes. A /31 (255.255.255.254) is defined by RFC 3021 for point-to-point links between two routers without needing network or broadcast addresses.

Related Networking Guides

Comments