Subnet Calculator
Calculate IPv4 subnets with CIDR notation. Get network address, broadcast address, usable host range, and visual binary breakdown.
Advertisement
Network Input
Results
Binary Visualization
Advertisement
How to Use the Subnet Calculator
The Subnet Calculator helps you quickly determine all the important properties of an IPv4 subnet. Enter any IP address and select a CIDR prefix length (or use the quick select buttons for common sizes) to instantly see the network address, broadcast address, usable host range, total and usable host counts, wildcard mask, IP class, and whether the address is private or public.
The binary visualization shows exactly which bits form the network portion and which form the host portion. Network bits are highlighted in gold, making it easy to see the boundary between network and host. This is especially helpful when learning how subnetting works or when you need to verify that two addresses are on the same subnet.
Use the Subnet Splitter to divide a network into equal-sized subnets. Select how many subnets you need (2, 4, 8, 16, or 32), and the calculator shows each resulting subnet with its network address, usable range, and broadcast address. This is invaluable when designing VPC layouts, planning network segments, or configuring cloud infrastructure.
The CIDR Quick Reference table shows all common prefix lengths with their subnet masks, usable host counts, and typical use cases. The row matching your current CIDR selection is highlighted for easy comparison. Whether you're configuring AWS security groups, setting up firewall rules, designing Kubernetes cluster networking, or troubleshooting connectivity issues, this calculator gives you all the information you need in one place.
All calculations happen instantly in your browser with zero network requests. Share your results using the Share button, which encodes the IP and CIDR prefix in a URL that anyone can open to see the same subnet details.
Frequently Asked Questions
What is a subnet?
A subnet (subnetwork) is a logical subdivision of an IP network. Subnetting allows you to divide a large network into smaller, more manageable segments. Each subnet has its own network address, broadcast address, and range of usable host addresses. Subnets are defined by combining an IP address with a subnet mask.
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation is a compact way to specify an IP address and its associated subnet mask. It uses a slash followed by the number of network bits. For example, 192.168.1.0/24 means the first 24 bits are the network portion, leaving 8 bits for host addresses (254 usable hosts).
How do I calculate the number of usable hosts?
The formula is 2^(32 - CIDR prefix) - 2. You subtract 2 because the first address is the network address and the last is the broadcast address. For example, a /24 network has 2^8 - 2 = 254 usable hosts. The exceptions are /31 (2 usable for point-to-point links) and /32 (single host).
What is a wildcard mask?
A wildcard mask is the inverse of a subnet mask. Where the subnet mask has 1s, the wildcard has 0s, and vice versa. For a /24 (255.255.255.0), the wildcard mask is 0.0.0.255. Wildcard masks are commonly used in access control lists (ACLs) on Cisco routers and in OSPF configuration.
What are private IP address ranges?
RFC 1918 defines three private IP ranges: 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 and are used for internal networks, home networks, and VPCs.
What is the difference between /24 and /32?
A /24 network has 256 total IPs (254 usable hosts) and is the most common subnet size for LANs. A /32 represents a single host address with no network range. /32 is used for loopback addresses, host routes in routing tables, and assigning individual IPs in cloud environments.