Subnet Calculator
Plan and calculate IP subnets, masks, and ranges.
Enter a valid IP address to calculate.
Recommended Tools
Hand-picked utilities you might find useful
Reading a CIDR Block: Ranges, Masks and Host Counts
Overview
A subnet calculator takes an IP address and a CIDR prefix (like /24) and works out everything that follows: the network address, broadcast address, usable host range, subnet mask and how many hosts the block holds. It replaces the mental binary math network engineers would otherwise do by hand, giving you the exact boundaries of a subnet instantly and in your browser.
How to Use (Step by Step)
- 1
Enter an IP and prefix
Type an address and a CIDR prefix (e.g. 192.168.1.0/24) or an equivalent subnet mask.
- 2
Read the derived values
See the network address, broadcast address, usable host range, mask and host count.
- 3
Adjust the prefix to plan
Change the prefix to see how splitting or combining subnets changes the ranges and host capacity.
How It Works
You enter an IP and a prefix length or subnet mask. The tool converts them to binary internally, applies the mask to find the network and broadcast addresses, and derives the first and last usable host addresses plus the total host count (2^(32−prefix) − 2 for IPv4). It presents the results in the decimal notation you actually use.
When to Use This
Planning how to divide a network into subnets. Checking whether two addresses sit in the same subnet. Finding the usable host range before assigning IPs. Sizing a subnet to fit a required number of hosts. Verifying a firewall or routing rule's address range. Learning or teaching how CIDR and subnet masks work.
Frequently Asked Questions
In IPv4, the first address in a block is the network address and the last is the broadcast address; neither can be assigned to a host, so usable hosts are the total minus two.