IPv4 Subnet, CIDR & VLSM Calculator
Calculate IPv4 network address, broadcast address, usable host range, subnet and wildcard masks from any IP and CIDR prefix, split networks into equal subnets, and plan VLSM allocations with step-by-step binary breakdowns.
How to Calculate a Subnet in 3 Steps
Type an IPv4 address and choose a CIDR prefix (like /24) or paste a dotted mask such as 255.255.255.0.
Read the network address, broadcast address, usable host range and binary breakdown instantly.
Use 'Equal Split' to divide the network into subnets or 'VLSM Planner' to allocate subnets by host requirement.
Networks & Communications Subnetting Lab Challenge
Unique Dataset per Student IDEnter your instructor's Activity Code and your Student ID to generate a deterministic practice dataset and verifiable lab ticket.
🔒 Student IDs are processed 100% locally in your browser and never stored on our servers.
Note: Every student receives different numbers to prevent copying a classmate's screenshot. This ticket is an automated integrity check for classroom labs; for high-stakes exams, pair with your official LMS.
IPv4 Subnet, CIDR & VLSM Calculator
Compute network, broadcast, host range, masks and binary form. Split networks or plan VLSM for lab exercises.
Enter a valid IPv4 address (four numbers from 0 to 255) and a prefix from 0 to 32.
This prefix is too small to divide further. Use a prefix of /29 or larger blocks.
Subnet requirements (hosts needed)
Usable hosts
Total addresses
- Subnet mask
- Wildcard mask
- Broadcast
- First host
- Last host
Awaiting a valid address
Your subnet details will appear here instantly.
Address class
Address type
Integer / Hex
Your address is
Step-by-step: IP AND Mask = Network
Blue bits are the network portion ( bits), amber bits are the host portion ( bits).
| . |
Hosts = 2 − 2 = usable addresses ().
Equal subnet table
| # | Subnet | Usable host range | Broadcast | Hosts |
|---|---|---|---|---|
VLSM allocation plan
Addresses used
Space remaining
Plan status
| Subnet name | Hosts needed | Network / prefix | Mask | Usable range | Broadcast | Spare | |||||
|---|---|---|---|---|---|---|---|---|---|---|---|
IPv4 Subnetting Explained for Networking Students
Subnetting divides one IPv4 network into smaller, more efficient networks. Every IPv4 address has 32 bits. The subnet mask (or CIDR prefix) tells routers how many of those bits identify the network and how many identify the host. This calculator performs the same bitwise AND operation you learn in Networks and Communications courses and shows every step.
Core Formulas
- Network address: IP address AND subnet mask.
- Broadcast address: network address OR wildcard mask (all host bits set to 1).
- Total addresses: 2(32 − n) where n is the prefix length.
- Usable hosts: 2(32 − n) − 2 for prefixes /30 and shorter.
- Block size: 256 − the interesting octet of the mask (the "magic number" method).
CIDR Quick Reference Chart
| CIDR | Subnet mask | Total addresses | Usable hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
Worked Example
Given 192.168.10.45/26: the mask is 255.255.255.192, so the block size is 64. The subnet containing .45 starts at
192.168.10.0 and ends at 192.168.10.63 (broadcast). Usable hosts are 192.168.10.1 to
192.168.10.62, giving 26 − 2 = 62 hosts.
VLSM Design Checklist
- List every LAN and WAN link with the number of hosts required.
- Add 2 to each requirement (network and broadcast) and round up to the next power of two.
- Allocate from the largest subnet to the smallest, aligning each block on its boundary.
- Use /30 (or /31) for point-to-point router links.
- Document the unused space so you can expand later.
Frequently Asked Questions
What is a subnet mask and what does CIDR notation (/24) mean?
A subnet mask separates an IPv4 address into a network portion and a host portion. CIDR notation writes the mask as the number of leading 1-bits: /24 means the first 24 bits are the network, which equals the mask 255.255.255.0 and leaves 8 bits (256 addresses) for hosts.
How do I calculate the network address, broadcast address and usable hosts?
Convert the IP and mask to binary and AND them to get the network address. The broadcast address is the network address with all host bits set to 1. Usable hosts = 2^(32 - n) - 2, where n is the CIDR prefix. For example, 192.168.10.45/24 has network 192.168.10.0, broadcast 192.168.10.255 and 254 usable hosts.
Why are there two fewer usable hosts than total addresses?
The first address of a subnet is the network address and the last is the broadcast address, so neither can be assigned to a device. The exceptions are /31 (RFC 3021 point-to-point links, 2 usable addresses) and /32 (a single host route).
What is VLSM and why should I allocate the largest subnet first?
Variable Length Subnet Masking (VLSM) lets you give each subnet a different prefix length so that addresses are not wasted. Allocating the largest requirement first keeps every block aligned on its natural boundary and prevents fragmentation of the remaining address space.
What are the private IPv4 address ranges?
RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12 (172.16.0.0 to 172.31.255.255) and 192.168.0.0/16 for private networks. Addresses in 169.254.0.0/16 are link-local (APIPA) and 127.0.0.0/8 is loopback.
What is a wildcard mask and where is it used?
A wildcard mask is the bitwise inverse of the subnet mask (for /24 it is 0.0.0.255). Cisco access control lists and OSPF network statements use wildcard masks to specify which address bits must match.
Academic References, Official Standards & Statutory Sources
Peer-reviewed literature, DepEd orders, CHED memoranda, and verified empirical guidelines.
RFC 4632: Classless Inter-Domain Routing (CIDR): The Internet Address Assignment and Aggregation Plan
Fuller, V., & Li, T. (2006). Classless Inter-Domain Routing (CIDR): The Internet Address Assignment and Aggregation Plan (RFC 4632, BCP 122). Internet Engineering Task Force. https://doi.org/10.17487/RFC4632
RFC 1918: Address Allocation for Private Internets
Rekhter, Y., Moskowitz, B., Karrenberg, D., de Groot, G. J., & Lear, E. (1996). Address Allocation for Private Internets (RFC 1918, BCP 5). Internet Engineering Task Force. https://doi.org/10.17487/RFC1918
RFC 3021: Using 31-Bit Prefixes on IPv4 Point-to-Point Links
Retana, A., White, R., Fuller, V., & McPherson, D. (2000). Using 31-Bit Prefixes on IPv4 Point-to-Point Links (RFC 3021). Internet Engineering Task Force. https://doi.org/10.17487/RFC3021
Computer Networking: A Top-Down Approach (8th ed.) – Network Layer: IPv4 Addressing & Subnetting
Kurose, J. F., & Ross, K. W. (2021). Computer networking: A top-down approach (8th ed., Chapter 4: The Network Layer). Pearson.
Questions, Help & Academic Discussion
0Have questions about IPv4 Subnet, CIDR & VLSM Calculator calculations, DepEd/CHED formulas, or thesis interpretation? Ask here or help fellow scholars!
No questions asked yet
Be the first to ask a question about interpreting formulas or using IPv4 Subnet, CIDR & VLSM Calculator!
✏️ Leave a Comment or Ask a Question
100% free and open for Filipino students, teachers, and thesis writers. No account required.