ToolsNetwork & DNS › Subnet Calculator

Subnet Calculator — IP Subnet / CIDR Calculator Online Free

Enter an IPv4 address and a prefix length (CIDR /notation) or subnet mask. Instantly calculate network address, broadcast, host ranges, usable hosts, and binary breakdown. Free, no signup, runs in your browser.

IPv4 only — four octets, e.g. 10.0.0.0 or 172.16.0.1

Prefix length or subnet mask

0–32 · common values: /8 (class A), /16 (class B), /24 (class C)

Keep going

More network tools

LiveNetwork

DNS Lookup

Query DNS records for any domain — A, AAAA, MX, TXT, CNAME, NS, SOA and more.

Open tool
LiveNetwork

WHOIS Lookup

Look up domain registration details, registrar, nameservers, and expiry dates.

Open tool
LiveNetwork

MX Lookup

Query MX records for a domain to see which mail servers are configured.

Open tool
LiveNetwork

Online Status Checker

Check whether a website or server is currently online and responding.

Open tool

Subnet Calculator is a free, browser-based tool for computing IPv4 subnet details from an IP address and a prefix length or subnet mask. Enter any IPv4 address and a CIDR prefix (/0 through /32) or a dotted-decimal subnet mask (e.g. 255.255.255.0), click Calculate, and instantly see ten computed values: network address, broadcast address, first and last usable host, total and usable host counts, subnet mask, wildcard mask, and binary representations of both the IP and the mask. No server request is made — all computation runs directly in your browser.

Network administrators, sysadmins, cloud engineers, and students use subnet calculators when configuring routers, firewalls, cloud VPCs, VLANs, and security groups. Getting the network address, broadcast address, and usable range wrong by even one bit causes routing failures that are difficult to diagnose after the fact. The binary breakdown rows make the bit-boundary logic visible — you can see exactly which bits are the network prefix and which are the host portion.

How subnetting works

An IPv4 address is 32 bits. A subnet mask divides those bits into a network portion (all 1-bits) and a host portion (all 0-bits). The prefix length /N means the first N bits are the network address. ANDing the IP address with the mask gives the network address. ORing the network address with the inverse of the mask (the wildcard mask) gives the broadcast address. The first usable host is the network address plus one; the last usable host is the broadcast address minus one. Total hosts = 2^(32−N); usable hosts = max(0, total−2).

CIDR prefix vs. subnet mask input

CIDR notation (/24, /16, /8) and dotted-decimal subnet masks (255.255.255.0, 255.255.0.0, 255.0.0.0) express the same information. This tool accepts both: use the "Prefix / CIDR" tab to enter a number from 0 to 32, or switch to "Subnet mask" to enter a dotted-decimal mask. The tool validates the mask to ensure it consists only of a contiguous block of 1-bits followed by 0-bits — non-contiguous masks (sometimes seen in legacy equipment) are rejected with an error.

Common use cases

Frequently asked questions

What is a subnet and why do I need to calculate one?

A subnet is a logical partition of an IP network into smaller segments. Subnet calculation tells you the usable IP range within that segment, the network and broadcast addresses you cannot assign to hosts, and the total number of usable addresses. It is essential for configuring routers, firewalls, cloud VPCs, and VLANs correctly.

What is CIDR notation (/24, /16, etc.)?

CIDR (Classless Inter-Domain Routing) notation expresses a subnet mask as a prefix length — the number of consecutive 1-bits in the mask starting from the left. /24 means 24 bits are fixed (the network portion), leaving 8 bits for hosts (256 addresses, 254 usable). /16 leaves 16 bits for hosts (65,536 addresses). The shorter the prefix, the larger the network.

What is the difference between usable hosts and total hosts?

Total hosts is 2 raised to the number of host bits (e.g. 2^8 = 256 for /24). Usable hosts is total minus 2: the network address (first) and broadcast address (last) cannot be assigned to devices. A /24 network therefore has 254 usable host addresses.

What is a wildcard mask and how is it used?

A wildcard mask is the inverse of the subnet mask — you get it by subtracting each octet from 255. A /24 subnet mask of 255.255.255.0 has a wildcard of 0.0.0.255. Wildcard masks are used in Cisco ACLs and OSPF configuration to define which bits of an IP address must match a rule (0 = must match, 1 = don't care).

Does this tool support IPv6?

Not yet — this tool currently covers IPv4 only. IPv4 covers the vast majority of subnet planning tasks for local networks, VPNs, and cloud VPCs. IPv6 subnet calculation is a planned future addition.