CIDR & Subnet Calculator
Calculate IP network address, broadcast address, and usable IP range.
| # | CIDR | Usable Host Range | Broadcast address | Usable hosts |
|---|---|---|---|---|
| 1 | 192.168.1.0/26 | 192.168.1.1 – 192.168.1.62 | 192.168.1.63 | 62 |
| 2 | 192.168.1.64/26 | 192.168.1.65 – 192.168.1.126 | 192.168.1.127 | 62 |
| 3 | 192.168.1.128/26 | 192.168.1.129 – 192.168.1.190 | 192.168.1.191 | 62 |
| 4 | 192.168.1.192/26 | 192.168.1.193 – 192.168.1.254 | 192.168.1.255 | 62 |
10.0.0.5/32, 10.0.0.6/31, 10.0.0.8/29, 10.0.0.16/28, 10.0.0.32/27, 10.0.0.64/26, 10.0.0.128/31, 10.0.0.130/32About this tool
CIDR notation such as 10.0.0.0/16 describes a block of IP addresses: the number after the slash says how many leading bits identify the network, and the remaining bits number the hosts inside it. It is how you define VPCs and subnets in AWS, Azure and Google Cloud, write firewall and security-group rules, configure Kubernetes pod networks and plan office LANs.
This calculator shows everything about a block: network and broadcast addresses, subnet mask, wildcard mask, usable host range and count, and the binary view that explains where those numbers come from. It also splits a network into equal subnets, checks whether an address belongs to it, converts an arbitrary IP range into the minimal list of CIDR blocks, and handles IPv6.
How to use CIDR & Subnet Calculator
- Enter an address with a prefix, such as 192.168.1.10/24. If you leave out the prefix, /24 is assumed. Use the quick-mask buttons to try other sizes.
- Read the results: the network address is the first address of the block, the broadcast address is the last, and usable hosts are the addresses in between.
- Under "Split into subnets", choose a longer prefix, or enter how many hosts each subnet needs, to get a table of all resulting subnets.
- Use "Is an IP in this network?" to check firewall rules, and "IP range → CIDR blocks" to turn a start–end range into rules that tools accept.
- For IPv6, enter an address such as 2001:db8::1/64 to see the compressed and expanded forms, the network and the address type.
Examples
A typical /24 LAN
192.168.1.10/24
Network 192.168.1.0 · Mask 255.255.255.0 Usable 192.168.1.1 – 192.168.1.254 (254 hosts) Broadcast 192.168.1.255
Split a VPC into four subnets
10.0.0.0/24 → /26
10.0.0.0/26, 10.0.0.64/26, 10.0.0.128/26, 10.0.0.192/26 (62 hosts each)
Range to CIDR
192.168.1.10 – 192.168.1.20
192.168.1.10/31, 192.168.1.12/30, 192.168.1.16/30, 192.168.1.20/32
How the numbers are calculated
An IPv4 address is 32 bits. A /24 prefix keeps the first 24 bits as the network and leaves 8 bits for hosts, giving 2^8 = 256 addresses. The subnet mask is those 24 one-bits written as an address (255.255.255.0); the wildcard mask is its inverse (0.0.0.255), as used in Cisco ACLs and OSPF. The network address has all host bits set to 0 and the broadcast address has them all set to 1, so neither can be assigned to a device, leaving 254 usable hosts.
Two special cases: a /31 has two addresses and both are usable on point-to-point links (RFC 3021), and a /32 is a single host, often used for loopbacks and firewall rules.
Planning subnets in the cloud
- Cloud providers reserve extra addresses in every subnet. AWS reserves 5 (the first four and the last), so a /24 subnet in AWS has 251 usable addresses, not 254.
- Choose VPC ranges from private space (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) that do not overlap with your offices or other VPCs, so you can connect them later with peering or VPN.
- Leave room to grow: a /16 VPC split into /20 subnets gives sixteen subnets of 4,091 usable addresses each in AWS.
- Kubernetes needs separate, non-overlapping ranges for nodes, pods and services; pod ranges are often much larger than you expect.
Frequently asked questions
Everything you need to know about this tool and data security.
How many hosts does a /26 have?
64 addresses, of which 62 are usable for hosts: 2^(32−26) = 64, minus the network and broadcast addresses. Cloud providers may reserve a few more.
What is the difference between a subnet mask and a wildcard mask?
They are bitwise opposites. The subnet mask (255.255.255.0) marks the network bits with 1s; the wildcard mask (0.0.0.255) marks the host bits with 1s and is used by Cisco ACLs and OSPF configuration.
Are IP address classes (A, B, C) still used?
Not for routing. Classful addressing was replaced by CIDR in 1993. The class is shown for reference because it is still taught and mentioned in older documentation.
Why is an IPv6 subnet usually /64?
IPv6 address autoconfiguration (SLAAC) needs 64 host bits, so LAN segments are /64 by convention. That is 18 quintillion addresses per subnet; IPv6 has no broadcast address, so every address is usable.
Is my data safe when using this tool?
Yes, 100% safe. This tool operates entirely inside your web browser using client-side JavaScript and WebAssembly. Your data never touches any external server.
Related Tools
Featured Projects tech-fun.net
Explore more AI & productivity tools
Nihongo GameBox
Master Japanese typing, Kana, and JLPT N5–N1 vocabulary through interactive retro arcade games.
ResumeGPT
Tailors CVs and cover letters to every job opportunity with a multi-agent LLM pipeline, job tracking, and scheduled discovery.
CollectMind
Turns your bookmarks into a searchable AI knowledge base — entirely on-device, powered by Chrome's built-in Gemini Nano.