IPv4 Subnet Calculator

Plan and organize your network infrastructure with precise subnet calculations

IPv4 Subnet Calculator

Calculate subnet mask, network address, broadcast address, and usable host range from CIDR notation

Enter an IPv4 address with CIDR notation to get complete subnet information. Perfect for network planning and troubleshooting.

Try these examples:

Network Security

Proper subnetting enhances security by isolating network segments and controlling traffic flow between different parts of your network.

Resource Optimization

Efficiently allocate IP addresses to avoid waste and ensure you have enough addresses for all your devices.

Network Organization

Logically divide your network based on departments, geographic locations, or function for easier management.

Reduced Network Congestion

Properly segmented networks help reduce broadcast traffic and improve overall network performance.

Common Subnet Masks

Reference guide for frequently used subnet masks and their properties

/24255.255.255.0
Available hosts:254

Perfect for small to medium office networks. This is the most common subnet mask for local networks.

/16255.255.0.0
Available hosts:65,534

Suitable for large corporate networks with many departments and devices.

/8255.0.0.0
Available hosts:16,777,214

Extremely large networks. Usually reserved for ISPs or very large organizations.

/28255.255.255.240
Available hosts:14

Small network with limited hosts. Good for small offices or IoT device groups.

/30255.255.255.252
Available hosts:2

Point-to-point connections between routers or network devices.

/32255.255.255.255
Available hosts:1

Single host address, typically used for loopback addresses or specific device identification.

Understanding Subnetting

1What is Subnetting?

Subnetting is the practice of dividing a larger network into smaller, more manageable subnetworks or subnets. This division helps optimize network performance, improve security, and utilize IP address space more efficiently.

2CIDR Notation Explained

CIDR (Classless Inter-Domain Routing) notation represents an IP address followed by a forward slash and a number (e.g., 192.168.1.0/24). The number after the slash indicates how many bits in the network portion of the address are fixed, with the remaining bits representing hosts.

192.168.1.0/24 = Network: 192.168.1.0, Mask: 255.255.255.0, Hosts: 254

3Subnet Mask Fundamentals

A subnet mask is a 32-bit number that divides an IP address into network and host portions. The mask uses 1s to indicate the network portion and 0s to indicate the host portion. For example, 255.255.255.0 (11111111.11111111.11111111.00000000 in binary) designates the first 24 bits as the network address.

4Important Subnet Calculations

Network Address

The first address in a subnet, calculated by performing a bitwise AND operation between the IP address and subnet mask.

Broadcast Address

The last address in a subnet, used to send packets to all devices on that subnet simultaneously.

Usable Host Range

All addresses between the network and broadcast addresses that can be assigned to devices.

5Practical Applications

Subnetting is essential for:

  • Organizing networks by department, function, or location
  • Improving security through network segmentation
  • Reducing network congestion and broadcast traffic
  • Efficient IP address allocation and management

Frequently Asked Questions

How do I determine the right subnet size for my network?

Consider the number of hosts you need in each subnet, both currently and for future growth. Choose a subnet size that accommodates your largest subnet with some room for expansion. For example, if your largest department needs 100 IP addresses, a /25 subnet (126 usable addresses) would be appropriate.

Why can't I use the network and broadcast addresses for hosts?

The network address identifies the subnet itself and is used in routing tables. The broadcast address is used to send packets to all devices on that subnet simultaneously. Both are reserved for these special purposes and cannot be assigned to individual devices.

How do I calculate how many subnets I can create?

The number of subnets is calculated as 2 raised to the power of the difference between your new subnet bits and the original subnet bits. For example, if you subnet a /24 network into /26 networks, you're adding 2 subnet bits (26 - 24), so you can create 2² = 4 subnets.

What's the formula for calculating usable hosts in a subnet?

The number of usable host addresses in a subnet is 2ⁿ - 2, where n is the number of host bits (32 minus the CIDR prefix). For example, in a /24 subnet, there are 8 host bits, so the number of usable addresses is 2⁸ - 2 = 254. We subtract 2 to account for the network and broadcast addresses.

Need more networking tools?

Explore our complete suite of network administration utilities