Subnet Calculator

Subnetting divides a larger network into smaller, more efficient sub-networks. This calculator takes an IPv4 address with a CIDR prefix length (e.g., 192.168.1.0/24) or a separate subnet mask and computes every detail you need: network address, broadcast address, first and last usable hosts, total and usable host counts, wildcard mask, IP class, and binary representations. A built-in CIDR cheat sheet from /8 to /32 gives quick reference for common subnet sizes, making it an essential tool for network engineers, system administrators, and students studying for CCNA or CompTIA Network+ certifications.

star 4.8
auto_awesome AI
New

Enter IP with CIDR prefix (e.g., 192.168.1.0/24) or just an IP below

tune Or enter IP and subnet mask separately
hub Network Address
192.168.1.0
cell_tower Broadcast Address
192.168.1.255
shield Subnet Mask
255.255.255.0
flip_to_back Wildcard Mask
0.0.0.255
first_page First Usable Host
192.168.1.1
last_page Last Usable Host
192.168.1.254
groups Total Addresses
256
devices Usable Hosts
254
IP Class C
CIDR Notation /24
Type Private
data_object Binary Representations
IP Address
11000000.10101000.00000001.00000000
Subnet Mask
11111111.11111111.11111111.00000000
Network Address
11000000.10101000.00000001.00000000
table_chart CIDR Cheat Sheet (/8 through /32)
CIDR Subnet Mask Total IPs Usable Hosts

tips_and_updates Tips

  • A /24 subnet has 254 usable hosts and is the most common subnet for small networks
  • The wildcard mask is the inverse of the subnet mask and is used in ACLs and OSPF configurations
  • A /32 subnet represents a single host address, commonly used for loopback interfaces
  • Private IP ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 (RFC 1918)
  • Each additional prefix bit halves the number of available hosts in the subnet
  • VLSM (Variable Length Subnet Masking) lets you use different prefix lengths within the same network
  • Always reserve the first address (network) and last address (broadcast) — they cannot be assigned to hosts
  • For point-to-point links, a /30 subnet provides exactly 2 usable addresses

How to Use This Calculator

1

Enter an IP address

Type an IPv4 address with CIDR notation (e.g., 192.168.1.0/24) or enter the IP and subnet mask separately.

2

View subnet details

See the network address, broadcast address, host range, usable hosts, subnet mask, wildcard mask, and IP class.

3

Reference the cheat sheet

Use the built-in CIDR cheat sheet to quickly look up subnet sizes from /8 through /32.

The Formula

The number of usable host addresses in a subnet is 2 raised to the power of the host bits (32 minus the prefix length), minus 2 for the network and broadcast addresses. For a /24 subnet, that is 2^8 - 2 = 254 usable hosts.

Usable Hosts = 2^(32 - prefix) - 2

lightbulb Variables Explained

  • prefix The CIDR prefix length (0-32)
  • 32 Total bits in an IPv4 address
  • 2 Subtracted for network and broadcast addresses

tips_and_updates Pro Tips

1

A /24 subnet has 254 usable hosts and is the most common subnet for small networks

2

The wildcard mask is the inverse of the subnet mask and is used in ACLs and OSPF configurations

3

A /32 subnet represents a single host address, commonly used for loopback interfaces

4

Private IP ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 (RFC 1918)

5

Each additional prefix bit halves the number of available hosts in the subnet

6

VLSM (Variable Length Subnet Masking) lets you use different prefix lengths within the same network

7

Always reserve the first address (network) and last address (broadcast) — they cannot be assigned to hosts

8

For point-to-point links, a /30 subnet provides exactly 2 usable addresses

Subnet Calculator - IPv4 CIDR, Subnet Mask & Host Range

Calculate network address, broadcast address, subnet mask, wildcard mask, host range, and usable hosts for any IPv4 CIDR notation. Essential tool for network engineers, sysadmins, and networking students preparing for CCNA or CompTIA Network+ exams.

IPv4 Subnetting Explained

Subnetting divides a network into smaller segments, improving security, performance, and address allocation. Each subnet is defined by a network address and a prefix length that determines how many bits identify the network vs. the hosts.

CIDR Notation and Subnet Masks

CIDR notation (e.g., /24) replaced classful addressing to allow flexible allocation. A /24 corresponds to subnet mask 255.255.255.0, providing 254 usable hosts. Longer prefixes create smaller subnets with fewer hosts.

Wildcard Masks and Network Configuration

Wildcard masks are the inverse of subnet masks and are used in Cisco ACLs and OSPF configurations. For example, a subnet mask of 255.255.255.0 has a wildcard mask of 0.0.0.255, matching any address in that /24 block.

Frequently Asked Questions

sell

Tags

verified

Data sourced from trusted institutions

All formulas verified against official standards.