Skip to main content
Prabhava Groups

CIDR / Subnet Calculator

Enter an IPv4 or IPv6 address with a prefix length, such as 192.168.1.0/24, to see the network and broadcast addresses, masks, usable host range and host count. Everything is calculated in your browser.

IPv4 (10.0.0.0/16, or a dotted mask like 10.0.0.0/255.255.0.0) or IPv6 (2001:db8::/32).

Network details

Split into subnets

Is an IP inside this range?

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) writes a network as an address plus a prefix length, for example 10.0.0.0/16. The number after the slash says how many leading bits identify the network; the remaining bits identify hosts. A longer prefix means a smaller network, so /28 holds far fewer addresses than /16. This calculator converts that shorthand into the values you actually configure: the netmask, the first and last address and how many hosts fit.

How to use the calculator

Type a CIDR block, or click an example. For IPv4 you will see the network and broadcast addresses, subnet and wildcard masks, the usable host range, total and usable address counts, the binary mask, and whether the address is private, loopback, link-local or public. Use Split into subnets to carve a block into equal smaller blocks, and the range checker to test whether a specific IP belongs to the network. IPv6 input returns the expanded and compressed forms, the first and last address and the number of /64 networks inside.

Worked example

Suppose your VPC uses 10.20.0.0/16 and you want four equal subnets. A /16 has 65,536 addresses; splitting into /18 gives four blocks of 16,384: 10.20.0.0/18, 10.20.64.0/18, 10.20.128.0/18 and 10.20.192.0/18. Each has 16,382 usable hosts. Cloud providers reserve a few addresses per subnet, so always leave headroom beyond the figure shown here.

Common mistakes

  • Assuming every address is a host. In IPv4 the first and last address of a subnet are reserved, except in /31 and /32 networks.
  • Typing host bits. 192.168.1.77/24 is accepted, but the network is 192.168.1.0/24. The tool tells you when it normalised the address.
  • Overlapping ranges. Two subnets that share addresses will break routing. Check candidate blocks with the range checker before peering networks.
  • Splitting IPv6 too small. SLAAC needs a /64 on a LAN segment, so do not allocate smaller blocks to normal subnets.

New to subnetting? Read Subnetting Explained for DevOps Engineers.

Frequently asked questions

How many usable hosts are in a /24?

A /24 has 256 addresses. The first is the network address and the last is the broadcast address, which leaves 254 usable hosts. In general the usable count is 2^(32 - prefix) - 2.

Why do /31 and /32 networks behave differently?

A /32 is a single host, so it has exactly one address. A /31 is meant for point-to-point links (RFC 3021) and both of its addresses are usable because no broadcast address is needed.

What is the wildcard mask used for?

It is the inverse of the subnet mask (255.255.255.0 becomes 0.0.0.255). Cisco ACLs and OSPF network statements use it to say which address bits may vary.

Does IPv6 have a broadcast address?

No. IPv6 replaced broadcast with multicast, so every address in a prefix can be assigned and the calculator shows the first and last address instead. Standard LAN subnets are /64.

Is the address I type sent anywhere?

No. All calculations run locally in your browser. Nothing is uploaded, logged or stored.