subnet calculator

IPv4 Subnet Calculator

Enter an IPv4 address and CIDR prefix length to calculate network details instantly.

Enter values above and click Calculate to view subnet details.

What is a subnet calculator?

A subnet calculator is a networking tool that takes an IPv4 address and subnet size (usually shown as a CIDR prefix like /24 or /27) and returns all the important results you need for design, troubleshooting, and documentation. Instead of calculating bits by hand every time, you can instantly see the network address, broadcast address, subnet mask, and valid host range.

This is especially useful if you work with VLANs, routers, firewalls, cloud networks, home labs, or certification studies like Network+, CCNA, or cloud networking tracks.

Why subnetting matters in real networks

Subnetting is more than a classroom exercise. It helps you allocate addresses efficiently and keep networks organized. A good subnet plan improves security boundaries, supports routing scalability, and reduces broadcast noise in large environments.

  • Efficiency: Avoid wasting IP space by matching subnet size to actual host needs.
  • Performance: Smaller broadcast domains reduce unnecessary traffic.
  • Security: Segmentation makes it easier to enforce policy between departments or services.
  • Operations: Predictable ranges are easier to document, automate, and troubleshoot.

Core subnetting terms (quick reference)

IPv4 Address

A 32-bit address written in dotted decimal format (for example: 10.20.30.40).

CIDR Prefix

The number after the slash in CIDR notation, such as /26. It shows how many leading bits are network bits.

Subnet Mask

The dotted decimal version of the prefix. Example: /26 equals 255.255.255.192.

Network Address

The first address in the subnet. It identifies the subnet itself and is not assigned to regular hosts.

Broadcast Address

The last address in the subnet. It reaches all hosts inside that subnet (traditional IPv4 behavior).

Usable Host Range

The addresses between network and broadcast, usually assignable to hosts. Exception cases include /31 and /32.

How to use this subnet calculator

  1. Enter an IPv4 address (for example, 172.16.5.130).
  2. Enter a CIDR prefix from 0 to 32.
  3. Click Calculate.
  4. Review results like network ID, host range, mask, and address counts.

You can also paste an address in slash notation (like 192.168.1.50/28) directly in the IP field.

Popular subnet sizes and host capacity

  • /24 → 256 total addresses, 254 usable hosts
  • /25 → 128 total addresses, 126 usable hosts
  • /26 → 64 total addresses, 62 usable hosts
  • /27 → 32 total addresses, 30 usable hosts
  • /28 → 16 total addresses, 14 usable hosts
  • /29 → 8 total addresses, 6 usable hosts
  • /30 → 4 total addresses, 2 usable hosts
  • /31 → 2 total addresses, commonly used for point-to-point links
  • /32 → single host route

Manual subnetting in one paragraph

At a high level, subnetting is binary math. You apply the subnet mask to an IP address using bitwise AND to find the network address. Then you set all host bits to 1 to get the broadcast address. Total addresses are 2^(32 - prefix), and traditional usable hosts are total minus 2 (network and broadcast), except special cases like /31 and /32.

Where this helps most

  • Designing VLAN address plans for offices and campuses
  • Creating cloud VPC/VNet subnet boundaries
  • Troubleshooting overlap conflicts and routing issues
  • Preparing firewall object groups and ACL scopes
  • Studying CIDR, VLSM, and route summarization

Final tip

Even with a calculator, it pays to understand the logic. If you can quickly estimate boundaries for /24, /25, /26, /27, and /28 in your head, you will troubleshoot network issues much faster under pressure.

🔗 Related Calculators