Skip to content
Embed

Paste this on your site. The attribution link is required and is what makes embedding free.

IP Subnet Calculator — Free Online IPv4 Subnet Tool

Calculate subnet details for any IPv4 address and CIDR prefix length.

/24

Tip: Common CIDR values: /8 (Class A), /16 (Class B), /24 (Class C), /32 (single host).

Subnet Details

Network Address192.168.1.0
Broadcast Address192.168.1.255
Subnet Mask255.255.255.0
Wildcard Mask0.0.0.255
First Host192.168.1.1
Last Host192.168.1.254
Total Hosts256
Usable Hosts254
IP ClassC
Private AddressYes

CIDR Subnet Reference Table

CIDR Subnet Mask Total Hosts 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
/20 255.255.240.0 4,096 4,094
/16 255.255.0.0 65,536 65,534
/8 255.0.0.0 16,777,216 16,777,214

Related Calculators

About this calculator

Subnet Calculation Formula

Subnet Mask = (2^32 - 1) shifted left by (32 - CIDR) bits
Network Address = IP Address AND Subnet Mask
Broadcast Address = Network Address OR (NOT Subnet Mask)
Usable Hosts = 2^(32 - CIDR) - 2

Variables Explained

  • IP Address: A 32-bit number uniquely identifying a device on a network, written as four octets in dotted decimal notation (e.g., 192.168.1.100). Each octet represents 8 bits and ranges from 0 to 255. The IP address contains both the network identifier and the host identifier.
  • CIDR Prefix: A number from 0 to 32 indicating how many of the 32 bits are used for the network portion. A /24 means the first 24 bits are the network and the last 8 bits are for hosts. This replaced the older classful system where only /8, /16, and /24 were standard network boundaries.
  • Subnet Mask: A 32-bit value where the network bits are all 1s and the host bits are all 0s. For /24, the mask is 11111111.11111111.11111111.00000000 or 255.255.255.0 in decimal. The AND operation between the IP and mask isolates the network portion.
  • Wildcard Mask: The bitwise complement of the subnet mask. For a /24 subnet with mask 255.255.255.0, the wildcard mask is 0.0.0.255. Used in Cisco IOS configurations for ACLs and routing protocols where a 0 bit means "must match" and a 1 bit means "don't care."

Step-by-Step Example

Calculate the subnet details for the IP address 10.50.100.200 with a /20 prefix:

  1. Convert the /20 prefix to a subnet mask: first 20 bits are 1s = 255.255.240.0
  2. AND the IP with the mask: 10.50.100.200 AND 255.255.240.0 = 10.50.96.0 (network address)
  3. Calculate wildcard mask: 255 - 255 = 0, 255 - 255 = 0, 255 - 240 = 15, 255 - 0 = 255 = 0.0.15.255
  4. OR the network with the wildcard: 10.50.96.0 OR 0.0.15.255 = 10.50.111.255 (broadcast address)
  5. First host: network + 1 = 10.50.96.1
  6. Last host: broadcast - 1 = 10.50.111.254
  7. Total hosts: 2^(32-20) = 2^12 = 4,096
  8. Usable hosts: 4,096 - 2 = 4,094

This /20 subnet provides 4,094 usable host addresses ranging from 10.50.96.1 to 10.50.111.254. It covers 16 Class C equivalent blocks, making it suitable for a medium-sized campus or data center segment. The address 10.x.x.x falls in the Class A private range, confirming it is a non-routable internal address.

Sources

Disclaimer: This calculator is for informational and educational purposes only. Results are estimates and may not reflect exact values.

Last updated: November 3, 2026