Subnet Calculator

Subnet Calculator

Calculate network details from CIDR notation. All computation runs directly in your browser.


About the Subnet Calculator

CIDR notation such as 192.168.10.0/24 describes a block of IP addresses: the number after the slash is the prefix length, the count of leading bits that identify the network. The remaining bits identify hosts inside it. A /24 leaves 8 host bits (256 addresses), a /26 leaves 6 (64 addresses), and so on.

The subnet calculator takes an IPv4 address in CIDR notation and works out everything you need for planning a network or configuring a firewall: network and broadcast addresses, subnet and wildcard masks, the first and last usable host, the total and usable host counts, the address class, whether the range is private or public, and the binary representation.

Common uses

  • Planning VLANs, office networks or VPN address ranges without overlaps.
  • Designing subnets for cloud VPCs in AWS, Azure or Google Cloud.
  • Writing firewall rules and ACLs that need wildcard masks (Cisco) or CIDR ranges.
  • Studying for networking certifications such as CCNA or Network+.

How to use it

  1. Enter an address with a prefix, for example 10.0.4.17/22 (or click Try Me).
  2. Press Calculate.
  3. Read the network details. The address you enter does not need to be the network address — the calculator finds the network it belongs to.

Example

A /26 subnet:

Input
192.168.1.77/26
Output
Network Address:   192.168.1.64
Broadcast Address: 192.168.1.127
Subnet Mask:       255.255.255.192
Wildcard Mask:     0.0.0.63
Host Range:        192.168.1.65 – 192.168.1.126
Usable Hosts:      62
Scope:             Private

Tips and common pitfalls

  • Usable hosts = 2(32 − prefix) − 2, because the network and broadcast addresses cannot be assigned. A /31 is a special case for point-to-point links, and a /32 is a single host.
  • Private ranges (RFC 1918) are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. They are not routed on the public internet.
  • Cloud providers reserve some addresses in each subnet — AWS reserves five — so you get fewer usable hosts than the calculation shows.
  • The wildcard mask is the inverse of the subnet mask and is used in Cisco ACLs and OSPF configuration.

Frequently asked questions

What does /24 mean?

It means the first 24 bits of the address are the network part, which corresponds to the subnet mask 255.255.255.0 and gives 256 addresses (254 usable).

Are IP address classes still used?

Classful addressing (A, B, C) was replaced by CIDR in 1993, but the classes are still taught and shown for reference. Routing today is based purely on prefixes.

Does it support IPv6?

This calculator works with IPv4. IPv6 subnets are normally /64, which provides more host addresses than any network will ever need.

How do I split a network into smaller subnets?

Each extra prefix bit halves the block. A /24 splits into two /25s, four /26s or eight /27s. Calculate each one to get its range.

Related