Developer Tools

CIDR & Subnet Calculator

Calculate IP network address, broadcast address, and usable IP range.

Quick masks:
Subnet calculated successfully
Network
Network address192.168.1.0/24
Subnet Mask255.255.255.0
Wildcard mask0.0.0.255
Broadcast address192.168.1.255
Hosts
Usable Host Range192.168.1.1 – 192.168.1.254
Usable hosts254
Total Hosts256
Class / scopeClass C · Private (RFC 1918)
Binary
IP11000000101010000000000100001010
Mask11111111111111111111111100000000
Colored bits are the network part (24 bits); the rest identify hosts.
Split into subnets
#CIDRUsable Host RangeBroadcast addressUsable hosts
1192.168.1.0/26192.168.1.1 – 192.168.1.62192.168.1.6362
2192.168.1.64/26192.168.1.65 – 192.168.1.126192.168.1.12762
3192.168.1.128/26192.168.1.129 – 192.168.1.190192.168.1.19162
4192.168.1.192/26192.168.1.193 – 192.168.1.254192.168.1.25562
Is an IP in this network?
192.168.1.200 is inside 192.168.1.0/24
IP range → CIDR blocks
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/32

About 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

  1. 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.
  2. 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.
  3. Under "Split into subnets", choose a longer prefix, or enter how many hosts each subnet needs, to get a table of all resulting subnets.
  4. 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.
  5. 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

Input
192.168.1.10/24
Result
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

Input
10.0.0.0/24 → /26
Result
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

Input
192.168.1.10 – 192.168.1.20
Result
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.