Advertisement

IPv4 Subnet Calculator

Calculate network, broadcast, and host ranges from an IP address and CIDR mask with our free Subnet Calculator.

Advertisement

IP Subnetting

Subnetting divides an IP network into smaller sub-networks, improving organization, security, and routing efficiency. CIDR (Classless Inter-Domain Routing) notation like 192.168.1.0/24 specifies both the network and its size.

CIDR Notation

Key Subnet Addresses

How many hosts fit in a /24 subnet?

A /24 subnet has 2⁸ = 256 total addresses. Subtract 2 (network + broadcast) = 254 usable host addresses. Formula: usable hosts = 2^(32 − prefix) − 2. For /25: 2⁷ − 2 = 126. For /30 (point-to-point): 2² − 2 = 2.

What are private IP address ranges?

RFC 1918 defines three private ranges: 10.0.0.0/8 (16M addresses), 172.16.0.0/12 (1M addresses), and 192.168.0.0/16 (65K addresses). These are not routed on the public internet and are used for internal networks and home routers.

What is VLSM (Variable Length Subnet Masking)?

VLSM allows different subnets within the same network to use different prefix lengths. For example, a WAN link might use /30 (2 hosts) while a LAN uses /24 (254 hosts). This conserves IP space compared to assigning the same large subnet to every segment.