Introduction
This IPv4 subnet calculator does the network math for you. Type in an IP address like 192.168.1.0, pick a prefix such as /24, and press Calculate. You get the network address, broadcast address, subnet mask, wildcard mask, usable host range, and host count right away.
You can also paste an address with the prefix built in, like 10.0.0.0/16. The tool reads the /16 and sets the menus for you. Pick your subnet by prefix, by mask, by how many hosts you need, or by how many subnets you want — all four menus stay in sync. If you prefer to work straight from prefix notation, the CIDR Calculator covers the same math from the block side.
Every answer comes with a step-by-step solution, so you can see how each number was found. A bar shows how many bits go to the network and how many go to hosts. A chart compares hosts and subnets for each prefix length. At the bottom, a table lists every subnet in your block, and the subnet that holds your IP is marked in green.
Use it for homework, for CCNA study, or for planning a real network. It works for Class A, B, and C addresses and handles special cases like /31 point-to-point links and /32 host routes. For broader address lookups, try the IP Address Calculator, and for splitting one block into subnets of different sizes, use the VLSM Calculator.
How to use our IPv4 Subnet Calculator
Type an IPv4 address and pick a subnet size. The calculator shows you the network address, broadcast address, subnet mask, wildcard mask, usable host range, host count, IP class, IP type, step-by-step math, and a list of every subnet in the block.
IPv4 Address: Enter an address like 192.168.1.10. You can add a prefix, such as 192.168.1.0/24, and the tool will set the prefix for you.
Network Class Filter: Choose Any, A, B, or C. This limits the prefix, mask, host, and subnet menus to that class range. Leave it on Any if you are not sure.
Subnet Prefix (CIDR): Pick the prefix length, like /24 or /30. A bigger number means a smaller subnet with fewer hosts.
Subnet Mask (dot-decimal): Pick the mask, like 255.255.255.0. This is the same choice as the prefix, just in dotted form. Changing one changes the others. The Subnet Calculator is a good companion if you want a mask-first view of the same block.
Usable Hosts per Subnet: Pick how many hosts you need in each subnet. The tool sets the matching prefix and mask.
Number of Subnets: Pick how many subnets you want inside the base block. The tool works out the prefix that splits the block that way.
Calculate: Click this to run the math and update all results, the bit chart, and the subnet table.
Clear: Click this to reset everything back to the default 192.168.1.0/24 example.
Rows per page and paging: Choose how many subnets show at once, then use Prev, Next, or the page box to move through the list. Click "Go to my subnet" to jump straight to the subnet that holds your address.
What Is an IPv4 Address?
An IPv4 address is a number that names a device on a network. It is written as four numbers split by dots, like 192.168.1.10. Each number is called an octet, and each one can be 0 to 255. Under the hood, the address is really 32 bits (32 ones and zeros). If you want to practice converting octets by hand, the Binary Calculator and the Hex Calculator are handy side tools.
What Is a Subnet?
A subnet is a smaller network cut out of a bigger one. Splitting a network into subnets keeps traffic tidy, makes it safer, and stops one big group of devices from slowing each other down.
Every IPv4 address has two parts:
- Network part – says which network the device is on.
- Host part – says which device it is on that network.
The subnet mask decides where the split happens. A mask like 255.255.255.0 means the first 24 bits are network bits and the last 8 bits are host bits.
CIDR Notation (the /24 Part)
CIDR is a short way to write the mask. Instead of 255.255.255.0, you write /24. The number after the slash is how many bits belong to the network. A bigger number means a smaller subnet with fewer hosts.
Key Addresses in Every Subnet
- Network address – the first address in the subnet. It names the subnet and cannot be given to a device.
- Broadcast address – the last address. It sends a message to every device in the subnet, so it is not given to a device either.
- Usable host range – all the addresses in between. These go to computers, phones, printers, and routers.
- Wildcard mask – the mask flipped upside down. Cisco routers use it in access lists and OSPF. It is built with a bitwise flip, much like the XOR Calculator shows for other bit operations.
How Host Counts Work
Each host bit doubles the number of addresses. The math is simple:
- Total addresses = 2(32 − prefix)
- Usable hosts = total addresses − 2
You subtract 2 for the network and broadcast addresses. Two prefixes are special: a /31 gives 2 usable addresses for a link between two routers (RFC 3021), and a /32 is just one single address, often called a host route. The powers of two here grow fast — the Exponent Calculator shows why each extra host bit doubles the count.
Common Prefix Sizes
| Prefix | Subnet Mask | Total Addresses | Usable Hosts |
|---|---|---|---|
| /30 | 255.255.255.252 | 4 | 2 |
| /29 | 255.255.255.248 | 8 | 6 |
| /28 | 255.255.255.240 | 16 | 14 |
| /26 | 255.255.255.192 | 64 | 62 |
| /24 | 255.255.255.0 | 256 | 254 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
IPv4 Address Classes
Old IPv4 rules sorted addresses into classes by the first octet. Classes are mostly replaced by CIDR today, but network exams and older gear still use the names.
- Class A – first octet 1 to 126, default mask /8
- Class B – first octet 128 to 191, default mask /16
- Class C – first octet 192 to 223, default mask /24
- Class D – 224 to 239, used for multicast
- Class E – 240 to 255, saved for tests
Private vs. Public Addresses
Public addresses work on the open internet. Private addresses only work inside your own home or office network, and a router uses NAT to share one public address with them. RFC 1918 sets aside three private ranges:
- 10.0.0.0 – 10.255.255.255 (10.0.0.0/8)
- 172.16.0.0 – 172.31.255.255 (172.16.0.0/12)
- 192.168.0.0 – 192.168.255.255 (192.168.0.0/16)
Other blocks have special jobs too. 127.0.0.0/8 is loopback (your own device), and 169.254.0.0/16 is link-local, which a device picks on its own when no DHCP server answers.
Why Subnetting Matters
Good subnet planning saves addresses and cuts down on broadcast traffic. Give each site, floor, or team the subnet size it needs. A small office link may only need a /30, while a busy office floor may need a /23. Pick a size that fits today's devices with a little room to grow.
Address planning is only half the job. Once the subnets are set, size the circuit with the Bandwidth Calculator, check how long large transfers will take with the Download Time Calculator or the Data Transfer Calculator, and set uptime targets with the SLA Calculator. For the servers behind those subnets, the RAID Calculator helps plan storage, the Chmod Calculator handles file permissions, and the CRC Calculator is useful when checking frame integrity.