Menu

Subnet Calculator

Subnet Calculator

Choose the network class, subnet, and IP address in one pass. The results update into a simple summary that is easy to scan.

This is a planning aid only. Use Any if you want the calculator to stay open to every IPv4 class.

Subnet Summary

The most important values are shown first. Advanced details stay collapsed until you need them.

Network Class Any
Subnet Block
/24 = 255.255.255.0
One network block shown in both CIDR and dotted-decimal notation.
Network Address 192.168.1.0
Usable Host Range 192.168.1.1 - 192.168.1.254
Broadcast Address 192.168.1.255
Total Hosts 256
Usable Hosts 254
Wildcard Mask 0.0.0.255
Advanced details
Binary Subnet Mask 11111111.11111111.11111111.00000000
IP Class Class C
IP Type Private

Common Subnet Sizes

Start with the sizes people use most often, then expand the full reference if you need a deeper planning view.

Point-to-point /30
255.255.255.252 4 total 2 usable

Use this for router links and other tight two-endpoint connections.

Large network /16
255.255.0.0 65,536 total 65,534 usable

Useful when you need broad address space and room for growth.

View the full common subnet size reference
CIDR Subnet Mask Total IPs Usable Hosts Common Use
/30255.255.255.25242Point-to-point links
/29255.255.255.24886Small office
/28255.255.255.2401614Small network
/27255.255.255.2243230Department
/26255.255.255.1926462Large department
/25255.255.255.128128126Building floor
/24255.255.255.0256254Standard LAN
/23255.255.254.0512510Large LAN
/22255.255.252.01,0241,022Campus network
/16255.255.0.065,53665,534Large enterprise

Private IP Address Ranges

These are the address blocks you will usually choose from when designing internal networks.

Private A 10.0.0.0/8
10.0.0.0 - 10.255.255.255

16,777,216 addresses for large internal environments.

Private B 172.16.0.0/12
172.16.0.0 - 172.31.255.255

1,048,576 addresses for medium to large private networks.

Private C 192.168.0.0/16
192.168.0.0 - 192.168.255.255

65,536 addresses for home labs, offices, and small environments.

Horizontal Banner (Responsive) 728x90 / 320x100

How to Use This Tool

  1. Choose a Network Class: Use Any, A, B, or C to match the style of the network you are planning. This helps users think about the block before entering the details.
  2. Select a Subnet Mask or CIDR Block: Choose from /8 to /32. Common choices: /24 for small networks (254 hosts), /16 for medium networks (65,534 hosts), /30 for point-to-point links (2 hosts).
  3. Enter an IP Address: Input any valid IPv4 address from the network you're planning. The specific host portion doesn't matter—192.168.1.50 and 192.168.1.1 yield identical network calculations for the same subnet mask.
  4. Review the Calculations: Examine the network address (first IP), broadcast address (last IP), usable host range, and total host count. The network and broadcast addresses are reserved and cannot be assigned to devices.
  5. Apply to Your Infrastructure: Use the network address for routing table entries, the broadcast address for network-wide announcements, and assign devices within the usable host range only.

Technical Details

IPv4 subnetting divides the 32-bit address space using a bitmask. The subnet mask and CIDR block describe the same network range in different formats. A /24 network uses 24 network bits and 8 host bits, yielding 2^8 = 256 total addresses, with 254 usable after excluding network and broadcast addresses.

CIDR (Classless Inter-Domain Routing) replaced classful networking in 1993, enabling variable-length subnet masks for efficient IP allocation. The formula for usable hosts is (2^n) - 2, where n equals the number of host bits. For point-to-point links, /31 networks (RFC 3021) permit 2 usable addresses by eliminating the broadcast requirement. Network planning should account for growth—a /24 with 200 devices leaves minimal expansion room compared to a /23 with 510 usable addresses.

Common Mistakes to Avoid

  • Forgetting Reserved Addresses: The first address (network) and last address (broadcast) are never assignable. A /30 has 4 total addresses but only 2 usable hosts—critical for point-to-point links where every IP counts.
  • Overlapping Subnets: When planning multiple subnets, verify ranges don't overlap. 192.168.1.0/24 and 192.168.1.128/25 overlap because the /25 is contained within the /24. Use non-overlapping blocks like 192.168.1.0/25 and 192.168.1.128/25.
  • Confusing Subnet Mask Formats: /24 equals 255.255.255.0, not 255.255.255.24. The CIDR number indicates the count of network bits, while dotted-decimal shows which octets are masked. Always verify conversions when configuring network equipment.

Frequently Asked Questions

What is the difference between /24 and 255.255.255.0?

They're identical—just different notations. /24 (CIDR notation) means 24 bits are used for the network portion. 255.255.255.0 (dotted-decimal) represents the same thing as a binary mask. CIDR is shorter and commonly used in routing configurations.

How many usable IP addresses does a /24 network have?

A /24 network has 254 usable host addresses. The total is 256 (2^8), but you subtract 2 for the network address (first) and broadcast address (last), which cannot be assigned to devices.

What subnet should I use for a small office with 50 devices?

A /26 (64 addresses, 62 usable) is technically sufficient but leaves no room for growth. A /25 (128 addresses, 126 usable) provides better headroom. For flexibility, use a /24 (254 usable) unless IP conservation is critical.

What does a CIDR block tell me?

A CIDR block tells you how many bits belong to the network portion of an IPv4 address. For example, /24 means 24 network bits and 8 host bits, which equals 255.255.255.0.

What is the subnet mask for /24?

The subnet mask for /24 is 255.255.255.0. In this block, the first 24 bits are fixed for the network and the last 8 bits are available for hosts.

Why show CIDR and subnet mask together?

They describe the same network block in two formats. Showing both together makes it easier to verify routing, planning, and documentation without switching between notations.