Home โ€บ Networking & Subnet Calculators โ€บ Subnet Calculator

Subnet Calculator

Subnetting is the fundamental architectural technique used in IPv4 networking to partition a master network into smaller, efficient, and secure broadc

Networking
Formula & Methodology
ext{Subnet Mask} = (2^{32} - 1) ll (32 - ext{Prefix}) pmod{2^{32}} ext{Wildcard Mask} = sim ext{Subnet Mask} pmod{2^{32}} ext{Network IP} = ext{Host IP} & ext{Subnet Mask} ext{Broadcast IP} = ext{Network IP} | ext{Wildcard Mask} ext{Usable Hosts} = 2^{32 - ext{Prefix}} - 2 quad ( ext{for } /0 le ext{Prefix} le /30)

Bitwise AND-ing the 32-bit host IP with the subnet mask clears the host bits, yielding the base network address. Bitwise OR-ing the network address with the inverted wildcard mask sets all host bits to 1, producing the broadcast address. The usable host range spans from one above the network address to one below the broadcast address. For /31 prefixes (RFC 3021), both addresses are usable without dedicated network or broadcast reservations.

Network Identifier & CIDR Block

192.168.1.0/24

Overview

Subnetting is the fundamental architectural technique used in IPv4 networking to partition a master network into smaller, efficient, and secure broadcast domains. The Subnet Calculator analyzes any IPv4 host address and subnet mask prefix (/0 through /32), computing the exact network address, broadcast address, usable client host range, wildcard mask, and total IP capacity.

Whether you are configuring VLAN routing on enterprise switches, defining AWS Virtual Private Cloud (VPC) subnets, setting up firewall access control lists (ACLs), or studying for Cisco CCNA certification, this tool provides instant bitwise accuracy. It incorporates full support for RFC 3021 point-to-point links (/31) and RFC 1918 private scopes.

Worked Examples

Example 1: Standard Class C Local Subnet (192.168.1.10/24)

Host IP = 192.168.1.10, Subnet Mask = /24 (255.255.255.0)

  1. Convert IP to 32-bit binary: 11000000.10101000.00000001.00001010.
  2. Apply /24 mask (first 24 bits 1s, last 8 bits 0s): 255.255.255.0.
  3. Bitwise AND yields network address: 192.168.1.0.
  4. Wildcard mask (bitwise NOT): 0.0.0.255.
  5. Broadcast address: 192.168.1.255.
  6. Usable host range: 192.168.1.1 to 192.168.1.254 (254 usable hosts).
Final Answer: 192.168.1.0/24 (Mask: 255.255.255.0, Usable: 192.168.1.1 - 192.168.1.254)

Example 2: Router Point-to-Point Link (10.0.0.5/31 under RFC 3021)

Host IP = 10.0.0.5, Subnet Mask = /31 (255.255.255.254)

  1. Mask has 31 network bits and 1 host bit (2 total addresses).
  2. Network ID: 10.0.0.4, Broadcast: 10.0.0.5.
  3. Under RFC 3021 point-to-point links, both addresses are usable.
  4. Usable hosts: 10.0.0.4 and 10.0.0.5 (2 usable hosts).
Final Answer: 10.0.0.4/31 (2 usable hosts: 10.0.0.4 - 10.0.0.5)

Example 3: Enterprise Cloud Subnet (172.16.100.50/20)

Host IP = 172.16.100.50, Subnet Mask = /20 (255.255.240.0)

  1. Prefix /20 reserves 12 host bits (2ยนยฒ = 4,096 total addresses).
  2. Subnet mask: 255.255.240.0, Wildcard mask: 0.0.15.255.
  3. Network address: 172.16.96.0.
  4. Broadcast address: 172.16.111.255.
  5. Usable host range: 172.16.96.1 to 172.16.111.254 (4,094 usable hosts).
Final Answer: 172.16.96.0/20 (4,094 usable hosts)

How to Use This Calculator

  1. Enter any valid IPv4 host address (e.g. 192.168.1.10 or 10.0.0.1).
  2. Select the subnet mask prefix length from /0 to /32.
  3. View the primary network block identifier and comprehensive 8-row subnet breakdown.
  4. Review the usable host range and total capacity for network planning.

Reference Table

PrefixSubnet MaskTotal IPsUsable HostsCommon Usage
/32255.255.255.25511Single host route / Loopback
/31255.255.255.25422RFC 3021 Point-to-point link
/30255.255.255.25242Legacy point-to-point link
/29255.255.255.24886Small office / ISP public IP block
/28255.255.255.2401614Small department / DMZ
/27255.255.255.2243230Medium department subnet
/26255.255.255.1926462Corporate branch office
/25255.255.255.128128126Large department VLAN
/24255.255.255.0256254Standard Class C LAN
/23255.255.254.0512510Medium enterprise office
/22255.255.252.01,0241,022Enterprise campus / 4x Class C
/21255.255.248.02,0482,046Corporate building network
/20255.255.240.04,0964,094Cloud VPC application tier
/16255.255.0.065,53665,534Class B network / Cloud VPC
/8255.0.0.016,777,21616,777,214Class A network (e.g. 10.0.0.0/8)

Frequently Asked Questions

Why are there two fewer usable hosts than total IP addresses?
In standard IPv4 subnets (/0 to /30), the first address is reserved as the Network Identifier and the last address is reserved as the Broadcast Address for all hosts on the subnet. Subtracting these two produces the usable host count.
Can /31 subnets be used for router-to-router point-to-point links?
Yes. RFC 3021 standardizes /31 subnets for point-to-point links. Because there are only two endpoints on a point-to-point link, broadcast and network addresses are unnecessary, allowing both addresses to be assigned to router interfaces.
What is a wildcard mask and where is it used?
A wildcard mask is the bitwise inverse of a subnet mask (255.255.255.255 minus the subnet mask). It is used primarily in Cisco IOS router configurations, Access Control Lists (ACLs), and OSPF network statements.
What are the RFC 1918 private IP address ranges?
RFC 1918 defines three non-routable private address blocks: 10.0.0.0/8 (10.0.0.0 - 10.255.255.255), 172.16.0.0/12 (172.16.0.0 - 172.31.255.255), and 192.168.0.0/16 (192.168.0.0 - 192.168.255.255).
Does this calculator support IPv6?
This calculator is strictly dedicated to 32-bit IPv4 addressing. IPv6 uses 128-bit hexadecimal addressing and follows separate allocation and subnetting conventions.
Reviewed & Authored by: OnlineConvers Editorial Team ยท Last Updated: 2026-10-06
All IPv4 network, broadcast, and host addresses are evaluated using unsigned 32-bit bitwise arithmetic (normalised via >>> 0). Host allocations adhere strictly to IETF standards including RFC 1918 (Private Address Spaces), RFC 3021 (Using 31-Bit Prefixes on IPv4 Point-to-Point Links), and RFC 4632 (CIDR).