Subnet Calculator

Calculate network details from any IP address

Common Subnet Sizes

About This Tool

Enter an IP address with CIDR notation (e.g., 192.168.1.0/24) to calculate the network address, broadcast address, usable host range, and other subnet details. You can also enter a subnet mask in dotted decimal format (e.g., 192.168.1.0/255.255.255.0).

100% Client-Side Analysis

This tool runs 100% in your browser. No data is sent to any server.

What is Subnetting?

Subnetting is the practice of dividing a larger IP network into smaller, more manageable segments called subnets. Each subnet operates as its own network, with its own range of IP addresses, network address, and broadcast address. This allows network administrators to organise devices logically, improve security by isolating traffic between segments, and make more efficient use of IP address space.

For example, a hosting provider like NetOz might subnet their IP allocation to separate web servers, mail servers, and management infrastructure onto different network segments. A web server at 151.158.22.5 might sit on a /28 subnet dedicated to web hosting, while mail servers on a different /28 handle email traffic. This segmentation means a security issue on one subnet doesn't automatically expose the others.

Every IPv4 address is a 32-bit number, typically written as four decimal octets (e.g. 192.168.1.0). A subnet mask determines which portion of the address identifies the network and which portion identifies individual hosts. The more bits allocated to the network portion, the fewer hosts the subnet can contain — but the more subnets you can create.

CIDR Notation Explained

CIDR (Classless Inter-Domain Routing) is the modern standard for specifying IP address ranges. It replaced the older classful addressing system (Class A, B, C) which wasted large amounts of address space. CIDR notation appends a slash and a number to an IP address, indicating how many bits form the network prefix.

For example, 192.168.1.0/24 means the first 24 bits are the network portion, leaving 8 bits for host addresses. This gives 256 total addresses (28), of which 254 are usable for hosts (the network address and broadcast address are reserved).

How the Prefix Length Affects Host Count

CIDRSubnet MaskTotal IPsUsable Hosts
/32255.255.255.25511
/30255.255.255.25242
/28255.255.255.2401614
/24255.255.255.0256254
/16255.255.0.065,53665,534
/8255.0.0.016,777,21616,777,214

Each additional bit in the prefix halves the number of available hosts. A /24 has 254 usable hosts, a /25 has 126, a /26 has 62, and so on. Understanding this relationship is fundamental to efficient network planning.

IPv4 Subnet Examples

Small Office Network (/24)

A /24 subnet is the most common choice for small to medium office networks. It provides 254 usable IP addresses — more than enough for most businesses.

Network: 192.168.1.0/24
Subnet Mask: 255.255.255.0
Host Range: 192.168.1.1 – 192.168.1.254
Broadcast: 192.168.1.255
Usable Hosts: 254

Point-to-Point Link (/30)

A /30 subnet provides exactly 2 usable host addresses — perfect for a point-to-point connection between two routers or a server and its gateway. This is commonly used in data centre environments and WAN links.

Network: 10.0.0.0/30
Host Range: 10.0.0.1 – 10.0.0.2
Usable Hosts: 2

Web Hosting Subnet (/28)

A /28 subnet provides 14 usable hosts — ideal for a small group of servers. A hosting provider might allocate a /28 from their IP space for a customer's dedicated servers.

Network: 151.158.22.0/28
Subnet Mask: 255.255.255.240
Host Range: 151.158.22.1 – 151.158.22.14
Broadcast: 151.158.22.15
Usable Hosts: 14

Subnetting Quick Reference

Key Concepts

  • Network Address: The first address in a subnet, identifying the network itself. Not assignable to hosts.
  • Broadcast Address: The last address in a subnet, used to send packets to all hosts on the network. Not assignable to hosts.
  • Subnet Mask: A 32-bit number that separates the network and host portions of an IP address (e.g. 255.255.255.0 for a /24).
  • Wildcard Mask: The inverse of a subnet mask, commonly used in ACLs and routing configurations (e.g. 0.0.0.255 for a /24).
  • Usable Hosts: Total addresses minus 2 (network and broadcast). A /24 has 256 addresses but only 254 usable hosts.

Private IP Ranges (RFC 1918)

These address ranges are reserved for private networks and are not routable on the public internet:

10.0.0.0/8
16.7M addresses (Class A)
172.16.0.0/12
1M addresses (Class B)
192.168.0.0/16
65K addresses (Class C)

When to Use Different Subnet Sizes

  • /32 — Single host (used for loopback addresses and host routes)
  • /30 — Point-to-point links between routers (2 usable hosts)
  • /28 — Small server groups or DMZs (14 usable hosts)
  • /24 — Standard office network or VLAN (254 usable hosts)
  • /16 — Large campus or enterprise network (65,534 usable hosts)

Need to split or merge subnets? Try our Subnet Splitter & Merger. For related network diagnostics, use our DNS Lookup or Looking Glass tools.