lanDev Tool

Subnet Calculator

Enter an IP address and prefix length to get the complete subnet details instantly.

lanCIDR Notation
/
Examples:
error

memoryBinary Representation

Network bits    Host bits
tableCIDR Reference Table
PrefixSubnet MaskTotal HostsUsable Hosts

Frequently Asked Questions

CIDR (Classless Inter-Domain Routing) notation represents an IP address and its network mask as a single string: IP/prefix. The prefix (0–32) indicates how many bits form the network portion. For example, 192.168.1.0/24 means the first 24 bits identify the network, leaving 8 bits for hosts (254 usable addresses).
A subnet mask is a 32-bit number with consecutive 1-bits for the network portion and 0-bits for hosts. The /24 prefix equals the mask 255.255.255.0. The wildcard mask is the bitwise inverse: 0.0.0.255. Wildcard masks are commonly used in ACLs and routing protocols like OSPF.
The number of usable hosts is 2^(32−prefix) − 2. The −2 accounts for the network address (first) and broadcast address (last), which cannot be assigned to hosts. A /24 has 2^8 − 2 = 254 usable hosts. A /30 (common for point-to-point links) has only 2 usable hosts.
The network address (first in the range) identifies the subnet itself and cannot be assigned to a device. The broadcast address (last in the range) is used to send packets to all hosts in the subnet simultaneously. Both are reserved — only addresses between them can be assigned to devices.

About the Subnet Calculator

Enter any IP address and subnet mask (in CIDR notation or dotted decimal) to instantly see the network address, broadcast address, usable host range, number of usable hosts, and wildcard mask. Supports IPv4. Useful for network planning, firewall rule configuration, and understanding how IP addressing and subnetting work.