Subnet Calculator

Calculate network address, broadcast address, subnet mask, and number of usable hosts from any IPv4 address and CIDR prefix.

/
Network Address
Broadcast Address
Usable Hosts
Subnet Mask

How to Use This Calculator

  1. Enter each octet of your IPv4 address (four numbers 0–255).
  2. Enter the CIDR Prefix Length (e.g., 24 for a standard /24 network).
  3. The calculator shows the network address, broadcast address, subnet mask, and number of usable hosts.

Formula

Network Address = IP AND Subnet Mask

Broadcast Address = Network Address OR (NOT Subnet Mask)

Usable Hosts = 2^(32 − CIDR) − 2

Example

IP: 192.168.1.100, CIDR: /24

  • Subnet Mask = 255.255.255.0
  • Network Address = 192.168.1.0
  • Broadcast = 192.168.1.255
  • Usable Hosts = 254

Frequently Asked Questions

  • A subnet (subnetwork) divides a larger IP network into smaller logical networks. Subnetting improves performance and security by limiting broadcast domains.
  • CIDR (Classless Inter-Domain Routing) notation expresses a subnet mask as /N where N is the number of bits set to 1. For example, /24 = 255.255.255.0.
  • A /24 subnet has 256 addresses total: 254 usable hosts (minus 1 for network address, 1 for broadcast). Common examples: /24 = 254 hosts, /16 = 65,534 hosts.
  • The network address is the first IP in the subnet (identifies the subnet). The broadcast address is the last IP (sends to all hosts on that subnet). Neither can be assigned to a host.

Related Calculators