ENTRDEESFRPTIT
Free Tool

IPv4 Subnet Calculator

Enter any IPv4 address and CIDR prefix to instantly calculate network details including subnet mask, host range, broadcast address, and more. A free tool by IPv4Center.

What Is Subnetting?

Subnetting is the practice of dividing a larger IP network into smaller, more manageable sub-networks (subnets). It improves network performance, enhances security by isolating segments, and makes efficient use of limited IPv4 address space. Each subnet is defined by a network address and a subnet mask that determines how many host addresses are available within it. Learn more in our subnetting guide.

How Subnet Calculators Work

A subnet calculator takes an IPv4 address and a CIDR prefix length (e.g., /24) and performs bitwise operations to determine the network address, broadcast address, valid host range, and subnet mask. The CIDR prefix indicates how many leading bits of the 32-bit IP address represent the network portion — the remaining bits are available for host addresses within that subnet.

Common Subnet Reference

CIDRSubnet MaskUsable Hosts
/32255.255.255.2551
/31255.255.255.2542 (point-to-point)
/30255.255.255.2522
/29255.255.255.2486
/28255.255.255.24014
/27255.255.255.22430
/26255.255.255.19262
/25255.255.255.128126
/24255.255.255.0254
/23255.255.254.0510
/22255.255.252.01,022
/21255.255.248.02,046
/20255.255.240.04,094
/19255.255.224.08,190
/18255.255.192.016,382
/17255.255.128.032,766
/16255.255.0.065,534
/8255.0.0.016,777,214

Frequently Asked Questions

What is a subnet mask?
A subnet mask is a 32-bit number that separates an IP address into its network and host portions. It uses consecutive 1-bits for the network part and 0-bits for the host part. For example, 255.255.255.0 (/24) means the first 24 bits identify the network and the remaining 8 bits identify individual hosts.
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation is a compact way to specify an IP address and its associated subnet mask. It uses a forward slash followed by the number of network bits — for example, 192.168.1.0/24 means the first 24 bits are the network portion.
How many usable hosts does a /24 subnet have?
A /24 subnet has 256 total addresses (2^8). Two addresses are reserved: one for the network address and one for the broadcast address, leaving 254 usable host addresses.
What is the difference between a network address and a broadcast address?
The network address is the first address in a subnet and identifies the subnet itself — it cannot be assigned to a host. The broadcast address is the last address and is used to send data to all hosts within the subnet simultaneously.
What is a wildcard mask?
A wildcard mask is the inverse of a subnet mask. Where the subnet mask has 1-bits, the wildcard mask has 0-bits, and vice versa. Wildcard masks are commonly used in access control lists (ACLs) and routing protocols like OSPF to match ranges of IP addresses.
How do /31 and /32 subnets work?
A /31 subnet has 2 addresses and is used for point-to-point links between two routers (RFC 3021) — both addresses are usable. A /32 subnet represents a single host address and is used for loopback interfaces, host routes, and specific routing configurations.
What are private IP address ranges?
RFC 1918 defines three private IPv4 ranges: 10.0.0.0/8 (Class A), 172.16.0.0/12 (Class B), and 192.168.0.0/16 (Class C). These addresses are not routable on the public internet and are used within local area networks.
What are IP address classes?
IPv4 addresses were originally divided into five classes: Class A (1.0.0.0 – 126.255.255.255), Class B (128.0.0.0 – 191.255.255.255), Class C (192.0.0.0 – 223.255.255.255), Class D (224.0.0.0 – 239.255.255.255, multicast), and Class E (240.0.0.0 – 255.255.255.255, reserved). While classful addressing has been replaced by CIDR, the terminology is still widely used. See our IP address classes guide for details.