IP Subnet Calculator

Calculate subnet mask, CIDR notation, IP range, number of hosts, and network details from any IP address

/
/1 /8 /16 /24 /32
Common:

Binary Breakdown

About This Tool

IP subnetting divides a network into smaller segments, each with its own range of IP addresses. Understanding subnets is essential for network design, security, firewall rules, and cloud infrastructure. This calculator takes an IP address with either CIDR notation (like 192.168.1.0/24) or a subnet mask (like 255.255.255.0) and computes everything you need: network address, broadcast address, usable host range, total hosts, wildcard mask, IP class, and binary representations. It supports all IPv4 subnet sizes from /1 to /32 and automatically validates your input to prevent errors.

How to Use

1. Enter an IP address (e.g., 192.168.1.100) 2. Set the CIDR prefix length using the slider or type it directly (e.g., /24) 3. All results update instantly: network address, broadcast, host range, number of hosts 4. Use the subnet mask or wildcard mask in your firewall rules, router config, or cloud security groups 5. Click "Copy" to copy any value to your clipboard

Frequently Asked Questions

What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation is a compact way to specify an IP address and its associated network mask. It's written as an IP address followed by a slash and a number (e.g., 192.168.1.0/24). The number after the slash indicates how many bits of the address are the network portion.
What is the difference between subnet mask and wildcard mask?
A subnet mask marks network bits as 1 and host bits as 0 (e.g., 255.255.255.0). A wildcard mask is the inverse โ€” host bits are 1 and network bits are 0 (e.g., 0.0.0.255). Wildcard masks are used in Cisco ACLs and OSPF configurations.
How many usable hosts does a /24 network have?
A /24 network has 256 total addresses (2^8), but 2 are reserved: the network address (first) and broadcast address (last). So there are 254 usable host addresses. The formula is: 2^(32 - CIDR) - 2.
What is the network address vs broadcast address?
The network address is the first address in a subnet (all host bits set to 0) and identifies the subnet itself. The broadcast address is the last address (all host bits set to 1) and is used to send data to all hosts in the subnet. Neither can be assigned to a device.
What are the private IP address ranges?
There are three private IP ranges defined by RFC 1918: 10.0.0.0/8 (10.0.0.0 โ€“ 10.255.255.255), 172.16.0.0/12 (172.16.0.0 โ€“ 172.31.255.255), and 192.168.0.0/16 (192.168.0.0 โ€“ 192.168.255.255). These addresses are not routable on the public internet.
What is the difference between /31 and /32 subnets?
A /32 subnet contains exactly one IP address โ€” it's used for host routes and loopback addresses. A /31 subnet contains two addresses and is used for point-to-point links between two routers (RFC 3021), as no broadcast address is needed.

Related Tools