Subnet Calculator — IPv4 CIDR Calculator

Calculate IPv4 subnets instantly. Enter an IP address and CIDR prefix length to get the network address, broadcast address, host range, subnet mask, wildcard mask, number of usable hosts, and IP class. Essential tool for network engineers and administrators.

Network Address
Broadcast Address
First Usable Host
Last Usable Host
Subnet Mask
Wildcard Mask
Usable Hosts
Total Addresses
IP Class
CIDR Notation
Binary Subnet Mask

CIDR Reference Table

CIDRSubnet MaskWildcardAddressesUsable
Ad Space

How the Subnet Calculator Works

Enter any IPv4 address and select a CIDR prefix length (0-32). The calculator performs bitwise AND operations to determine the network address, then calculates the broadcast address, usable host range, subnet mask, and wildcard mask. All computation happens instantly in your browser — no data is sent to any server. Use it for network planning, troubleshooting, or studying for CCNA/CompTIA Network+ certifications.

Understanding CIDR Notation

CIDR (Classless Inter-Domain Routing) notation represents an IP address and its associated network prefix. For example, 192.168.1.0/24 means the first 24 bits define the network, leaving 8 bits for host addresses (256 total, 254 usable). A /32 is a single host, /24 is a standard subnet (254 hosts), and /16 provides 65,534 hosts. The reference table below shows all CIDR prefix lengths with their corresponding subnet masks and host counts.

Subnet Mask vs Wildcard Mask

A subnet mask identifies which bits of an IP address belong to the network portion (e.g., 255.255.255.0 for /24). A wildcard mask is the inverse — it identifies which bits belong to the host portion (e.g., 0.0.0.255 for /24). Subnet masks are used in routing and interface configuration, while wildcard masks are used in access control lists (ACLs) and OSPF routing configurations.

Common Subnet Sizes for Network Planning

/30 (4 addresses, 2 hosts) — point-to-point links between routers. /28 (16 addresses, 14 hosts) — small office or VLAN. /24 (256 addresses, 254 hosts) — standard LAN subnet. /22 (1,024 addresses, 1,022 hosts) — medium campus network. /16 (65,536 addresses) — large enterprise or data center. Choose the smallest subnet that fits your host count to conserve IP address space.