Stax
Tools

IP Subnet Calculator

Calculate IPv4 subnet details from CIDR notation.

Enter IP and prefix length, e.g. 10.0.0.1/16

Network Address192.168.1.0
Broadcast Address192.168.1.255
First Usable Host192.168.1.1
Last Usable Host192.168.1.254
Subnet Mask255.255.255.0
Wildcard Mask0.0.0.255
Binary Mask11111111.11111111.11111111.00000000
Total Hosts256
Usable Hosts254
IP ClassC
ScopePrivate (RFC 1918)
Common subnet sizes
CIDRSubnet MaskUsable HostsUse case
/24255.255.255.0254Small LAN (254 hosts)
/23255.255.254.0510Medium LAN (510 hosts)
/22255.255.252.01,022Office network (1022 hosts)
/16255.255.0.065,534Large network (65534 hosts)
/28255.255.255.24014Small segment (14 hosts)
/30255.255.255.2522Point-to-point link (2 hosts)

Click a row to load that prefix into the calculator.

IP Subnet Calculator — Instantly Compute Network Address, Host Range, and Subnet Details

Subnetting is one of the fundamental skills in network engineering and cloud infrastructure work. Whether you are designing a VPC in AWS, configuring OSPF areas on a corporate network, writing ACL rules, or setting up a home lab, you need to quickly calculate the network address, broadcast address, usable host range, subnet mask, and wildcard mask for any given CIDR block. This calculator does all of that instantly from any IPv4 address in CIDR notation.

How to use this calculator

Enter any IPv4 address in CIDR notation — for example, 192.168.1.0/24 or 10.0.0.0/16. The calculator immediately shows the network address (first address in the subnet), broadcast address (last address), usable host range (first and last assignable IP addresses), subnet mask in dotted-decimal notation, wildcard mask (inverse of subnet mask, used in ACLs and OSPF), total number of addresses, number of usable hosts, IP address class (A, B, C, or special), and whether the address falls in a private range (RFC 1918) or is public. Click any row in the common subnets reference table below to load a standard subnet size into the calculator.

Understanding CIDR notation and subnet math

CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its prefix length together — the /24 in 192.168.1.0/24 means the first 24 bits are the network prefix, leaving 8 bits for host addresses. With 8 host bits, there are 2^8 = 256 total addresses, minus 2 for the network and broadcast addresses, giving 254 usable hosts. A /16 gives 2^16 = 65,536 addresses (65,534 usable). A /30 gives 4 addresses (2 usable) — the minimum for a point-to-point link. The wildcard mask (e.g., 0.0.0.255 for a /24) is the bitwise inverse of the subnet mask and is used in Cisco ACL rules and OSPF network statements to specify which bits to match.

Who uses this tool

Network engineers use it when designing IP addressing schemes for enterprise networks or planning VPC CIDR ranges in cloud deployments. Systems administrators use it when configuring network interfaces and need to verify their subnet mask is correct. Security engineers use it when writing firewall ACL rules that require wildcard masks. Students studying for CCNA, CompTIA Network+, or AWS certifications use it to verify their manual subnetting calculations and build intuition for common subnet sizes.

Privacy and data handling

All subnet calculations are performed entirely in your browser using JavaScript bitwise operations — no IP addresses or network configurations are sent to any server.

Frequently asked questions

What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its subnet mask together, e.g. 192.168.1.0/24. The number after the slash indicates how many bits are in the network prefix.
What is the difference between network address and broadcast address?
The network address is the first address in a subnet (all host bits = 0). The broadcast address is the last address (all host bits = 1). Neither can be assigned to a host.
How are usable hosts calculated?
Usable hosts = 2^(32−prefix) − 2. We subtract 2 for the network and broadcast addresses. A /30 h total addresses and 2 usable hosts. /31 and /32 are treated specially for point-to-point and loopback.
What is a wildcard mask?
A wildcard mask is the inverse of the subnet mask. It is used in ACL rules and OSPF configuration to specify which bits to ignore. E.g., subnet mask 255.255.255.0 h 0.0.0.255.
Which are private IP ranges?
RFC 1918 defines three private ranges: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Addresses in these ranges are not routable on the public internet. 127.0.0.0/8 is reserved for loopback.

Related tools