How to use IPv4 Subnet Calculator
- 1
Enter an IPv4 address (e.g. 192.168.1.1).
- 2
Use the slider to select a CIDR subnet mask (e.g. /24).
- 3
Instantly view the network address, broadcast address, and host range.
Calculate network ranges, broadcast addresses, and total usable hosts from any IPv4 address and CIDR block.
Enter an IPv4 address (e.g. 192.168.1.1).
Use the slider to select a CIDR subnet mask (e.g. /24).
Instantly view the network address, broadcast address, and host range.
Classless Inter-Domain Routing (CIDR) is a method for allocating IP addresses and IP routing. The /number represents how many bits are used for the network.
When computer networks were first designed, IP addresses were assigned in large blocks called classes — Class A, B, and C. The problem? A company that needed 300 IP addresses would get an entire Class C block of 256, and a company that needed 5000 would get a Class B block of 65,536. Most of those addresses would go to waste.
Subnetting solves this by dividing a large block of IP addresses into smaller, more manageable chunks. Instead of handing out entire classes, network engineers can carve out exactly the size network they need.
Today, every network you work with — your home router, your company's infrastructure, cloud VPCs — uses subnetting. Understanding it is fundamental to networking.
An IPv4 address is 32 bits written as four groups of 8 bits (octets), each displayed as a decimal number from 0–255:
192.168.1.0
↑ ↑ ↑ ↑
8 8 8 8 bits = 32 bits total
Every IP address has two conceptual parts:
The subnet mask tells you where the dividing line is.
A subnet mask is also a 32-bit number. Ones (1) in the mask mark the network portion, zeros (0) mark the host portion:
255.255.255.0 in binary:
11111111.11111111.11111111.00000000
↑——————————————————————↑ ↑———————↑
Network (24 bits) Host (8 bits)
CIDR notation is a shorthand that replaces the full subnet mask with a prefix length — the count of 1 bits. So /24 means 24 network bits, which is the same as 255.255.255.0.
| CIDR | Subnet Mask | Usable Hosts | Use Case |
|---|---|---|---|
/30 | 255.255.255.252 | 2 | Point-to-point links |
/29 | 255.255.255.248 | 6 | Very small office |
/28 | 255.255.255.240 | 14 | Small office |
/27 | 255.255.255.224 | 30 | Department |
/24 | 255.255.255.0 | 254 | Standard LAN |
/22 | 255.255.252.0 | 1022 | Medium network |
/16 | 255.255.0.0 | 65,534 | Large enterprise |
Enter any IP address and prefix (like 192.168.10.50/26) and you get:
Network address — The first address in the subnet. This identifies the network itself and can't be assigned to a device.
Broadcast address — The last address in the subnet. Packets sent here go to every device on the subnet. Also not assignable.
First usable host — Network address + 1. The first address you can actually assign.
Last usable host — Broadcast address − 1.
Total hosts — 2^(host bits). For /24, that's 2^8 = 256.
Usable hosts — Total minus 2 (subtract network and broadcast addresses).
Subnet mask — Written in dotted decimal.
Wildcard mask — The inverse of the subnet mask. Used in access control lists (ACLs) and routing configurations.
You need to split 10.0.0.0/24 into 4 equal subnets.
You need at least 2 bits to represent 4 subnets (2² = 4). Borrowing 2 bits from the host portion gives you /26.
| Subnet | Network Address | Usable Range | Broadcast |
|---|---|---|---|
| 1 | 10.0.0.0 | 10.0.0.1 – 10.0.0.62 | 10.0.0.63 |
| 2 | 10.0.0.64 | 10.0.0.65 – 10.0.0.126 | 10.0.0.127 |
| 3 | 10.0.0.128 | 10.0.0.129 – 10.0.0.190 | 10.0.0.191 |
| 4 | 10.0.0.192 | 10.0.0.193 – 10.0.0.254 | 10.0.0.255 |
Each subnet has 64 addresses total, 62 usable. Paste any of these into the calculator to verify.
Not all IP addresses are public. Three ranges are reserved for private networks and never routed over the internet:
| Range | CIDR | Common Use |
|---|---|---|
| 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | Large enterprises, cloud VPCs |
| 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | Medium networks |
| 192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | Home routers, small offices |
Your home router assigns devices addresses from 192.168.x.x — that's the private range at work. NAT (Network Address Translation) then translates these to your single public IP when communicating with the internet.
Your data never leaves this device. All processing is handled locally by JavaScript.
Adjust the slider to instantly calculate network addresses, host ranges, and broadcast IPs. Useful for splitting large networks into smaller subnets.
Please check the IPv4 format (e.g. 192.168.1.1)