IP Subnet Calculator

Instantly calculate network addresses, broadcast addresses, wildcard masks, usable host ranges, and binary notation for any IPv4 subnet. Built for network engineers, sysadmins, and CCNA students.

Subnet Mask Cheat Sheet

Quick-reference table mapping CIDR prefixes to subnet masks, usable host counts, and Class C equivalents.

CIDRAddressesHostsNetmaskClass C
/3042255.255.255.2521/64
/2986255.255.255.2481/32
/281614255.255.255.2401/16
/273230255.255.255.2241/8
/266462255.255.255.1921/4
/25128126255.255.255.1281/2
/24256254255.255.255.01
/23512510255.255.254.02
/221,0241,022255.255.252.04
/212,0482,046255.255.248.08
/204,0964,094255.255.240.016
/198,1928,190255.255.224.032
/1816,38416,382255.255.192.064
/1732,76832,766255.255.128.0128
/1665,53665,534255.255.0.0256

What Is Subnetting and Why Does It Matter?

Subnetting is the process of partitioning a single IP network into two or more smaller, logical sub-networks. Every device connected to the internet sits inside a subnet. Understanding subnets is a core networking skill required for the Cisco CCNA, CompTIA Network+, and AWS Solutions Architect certifications.

When an organisation receives an IP address block from a Regional Internet Registry (such as APNIC, ARIN, or RIPE), they use subnetting to divide that block into departments, offices, or services. For example, a company with a /16 network (65,534 usable hosts) might split it into 256 separate /24 subnets - one for each floor, branch, or VLAN.

This calculator performs the same math that ipcalc and sipcalc do on Linux, but entirely in your browser - no server calls, no API usage, and no data leaves your machine. Enter any valid IPv4 address and a CIDR prefix to see the full breakdown.

How to Use This Calculator

  1. 1Enter any valid IPv4 address - public (like 8.8.8.8) or private (like 192.168.1.10).
  2. 2Select a CIDR prefix from the dropdown. It shows both slash notation (/24) and the full dotted-decimal mask (255.255.255.0).
  3. 3Click Calculate to see the Network Address, Broadcast Address, Wildcard Mask, usable host range, and full 32-bit binary breakdowns.

Understanding CIDR Notation

CIDR (Classless Inter-Domain Routing) replaced the legacy Classful addressing system in 1993. Instead of rigid Class A (/8), Class B (/16), and Class C (/24) boundaries, CIDR allows network boundaries at any bit position from /1 to /32.

The notation 192.168.1.0/24 means the first 24 bits identify the network and the remaining 8 bits identify individual hosts. The key formula is: 2(32 − prefix) − 2. The minus 2 accounts for the network address and broadcast address.

In the binary output, green bits are the locked network portion and grey bits are the variable host portion.

Private vs Public IP Ranges

The calculator automatically detects whether the IP belongs to a private (RFC 1918) address range:

Class A Private

10.0.0.0/8

16,777,214 hosts

Class B Private

172.16.0.0/12

1,048,574 hosts

Class C Private

192.168.0.0/16

65,534 hosts

To check who owns a public IP, use our IP Lookup tool. You can also browse Popular IPs to see the subnets behind Google, Cloudflare, and other major providers.

Frequently Asked Questions

What is a wildcard mask?

A wildcard mask is the inverse of a subnet mask. It is used primarily in Cisco ACLs and OSPF configurations. Where the subnet mask has a 1, the wildcard has a 0, and vice versa. For example, the wildcard for 255.255.255.0 is 0.0.0.255.

Why are there 2 fewer usable hosts than total addresses?

The first IP is the network address (identifies the subnet) and the last IP is the broadcast address (sends data to all hosts). Neither can be assigned to a device.

What is a /31 or /32 subnet used for?

A /31 has exactly 2 addresses for point-to-point router links. A /32 represents a single host address, commonly used in routing tables and loopback interfaces.