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).
This tool runs 100% in your browser. No data is sent to any server.
Related Tools
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
| CIDR | Subnet Mask | Total IPs | Usable Hosts |
|---|---|---|---|
| /32 | 255.255.255.255 | 1 | 1 |
| /30 | 255.255.255.252 | 4 | 2 |
| /28 | 255.255.255.240 | 16 | 14 |
| /24 | 255.255.255.0 | 256 | 254 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /8 | 255.0.0.0 | 16,777,216 | 16,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.
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.
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.
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.0for a /24). - Wildcard Mask: The inverse of a subnet mask, commonly used in ACLs and routing configurations (e.g.
0.0.0.255for 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:
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.