Calculation Results
Calculation Results
Please enter an IP address and CIDR.
About the IP/CIDR Calculator
About the IP/CIDR Calculator
Overview
Working out a subnet mask or the usable host range from a /24 or /20 by hand is tedious and easy to get wrong, especially once you're juggling multiple VLANs or VPC subnets at once. This calculator takes any IPv4 or IPv6 address with a CIDR prefix and instantly returns the netmask, network and broadcast addresses, usable host range and count, and the binary breakdown — so you can double-check a subnet design or decode someone else's without reaching for a notepad.
How to Use
- 1Pick the protocol, IPv4 or IPv6.
- 2Type an address into IP Address — you can include a /prefix here too (e.g., 192.168.1.100/24) and it'll populate the CIDR field for you.
- 3Otherwise, drag the CIDR slider to set the prefix length (e.g., 24) and watch the host range update live.
- 4Click Generate.
Specifications & Glossary
- CIDR (Classless Inter-Domain Routing): The slash notation pairing an IP address with its prefix length, e.g.
192.168.1.0/24. It replaced the old classful A/B/C addressing scheme, which wasted huge blocks of address space, and lets you carve out a subnet of nearly any size instead of being locked into fixed class boundaries. - Subnet mask: The bitmask marking where the network portion ends and the host portion begins. A
/24prefix and a255.255.255.0mask describe the exact same boundary — CIDR notation and dotted-decimal masks are just two ways of writing the same value. - Network address: The first address in the subnet, with every host bit set to 0. Routers and configuration files use this to refer to the subnet as a whole, for example in a routing table entry.
- Broadcast address: The last address in the subnet, with every host bit set to 1. IPv6 has no concept of broadcast — it relies on multicast instead, so this field only applies to IPv4.
- Usable host count: For IPv4 this is
2^(host bits) - 2, reserving one address for the network identifier and one for broadcast. IPv6 subnets don't reserve a broadcast address, so the usable count there is simply 2^(host bits). - IPv4 vs IPv6: IPv4 addresses are 32 bits, written as four dot-separated decimal octets (192.168.1.1). IPv6 addresses are 128 bits, written as eight colon-separated groups of hex digits (2001:db8::1), and the vastly larger address space removes most of the scarcity pressure that drives aggressive subnetting under IPv4.
- Binary representation: The address spelled out as a string of bits, so the boundary between the network portion and the host portion is something you can see, not just calculate.
Use Cases
- Planning subnets for a VPC or an on-premises network before you commit to an address plan.
- Double-checking that a firewall or security-group rule's IP range covers (or doesn't accidentally cover) the addresses you expect.
- Sizing CIDR blocks when laying out a VPC on AWS, GCP, or Azure.