Tooleux

Enter an IPv4 address with a CIDR suffix and get every derived value - network, broadcast, host range, netmask, and more.

Runs in your browser. Nothing leaves your device.
Calculate IPv4 subnets from any IP and CIDR. Get the network address, broadcast, host range, netmask, wildcard mask, and usable hosts. Also known as a CIDR calculator, netmask calculator, and IP range calculator. Free, offline, runs in your browser. Read more Show less

What is a subnet calculator?

A subnet calculator takes an IP address with a CIDR suffix - like 192.168.1.42/24 - and works out everything about the network that address belongs to: the network address, the broadcast address, the usable host range, the netmask, and how many hosts fit in the block.

Subnetting matters for network design, firewall rules, VPN configuration, ACLs, routing tables, and cloud VPC setup. Getting it wrong causes outages that are hard to diagnose. This tool makes every value explicit so you can copy the right one into your configuration.

How to use

Type an IP address with a CIDR suffix. The tool updates live and shows all derived values. Tap any result row to copy it to your clipboard.

You can also enter an IP with a dotted-decimal netmask, like 192.168.1.42 255.255.255.0, or a network address by itself. The tool normalizes everything.

Terminology

TermWhat it means
Network addressThe first address in the block. Identifies the subnet itself and cannot be assigned to a host.
Broadcast addressThe last address in the block. Sends a packet to every host on the subnet. Cannot be assigned to a host.
First host / Last hostThe range of addresses that can actually be assigned to devices. One below the broadcast, one above the network.
NetmaskA 32-bit mask that separates the network portion of an address from the host portion. /24 equals 255.255.255.0.
Wildcard maskThe inverse of the netmask. Used in Cisco ACLs and OSPF statements. /24 gives 0.0.0.255.
CIDRClassless Inter-Domain Routing. The /24 suffix is the count of network bits.
Total addresses2^(32-CIDR). Includes the network and broadcast addresses.
Usable hostsTotal minus 2 (for the network and broadcast addresses). For very small subnets (/31 and /32) the rules differ - see the FAQ.

CIDR cheat sheet

CIDRNetmaskTotalUsableTypical use
/30255.255.255.25242Point-to-point link
/29255.255.255.24886Small server group
/28255.255.255.2401614Small office
/27255.255.255.2243230Department
/26255.255.255.1926462Mid-size office
/25255.255.255.128128126Large department
/24255.255.255.0256254Standard LAN
/23255.255.254.0512510Two merged /24s
/22255.255.252.01,0241,022Building network
/21255.255.248.02,0482,046Campus segment
/20255.255.240.04,0964,094Large campus
/16255.255.0.065,53665,534Enterprise private range
/8255.0.0.016,777,21616,777,214Huge private space

Private IP ranges

RFC 1918 reserves three IPv4 ranges for private networks. They are never routed on the public internet.

RangeCIDRSize
10.0.0.0 - 10.255.255.25510.0.0.0/816.7 million
172.16.0.0 - 172.31.255.255172.16.0.0/121 million
192.168.0.0 - 192.168.255.255192.168.0.0/1665,536

Also reserved: 127.0.0.0/8 (loopback), 169.254.0.0/16 (link-local / APIPA), 100.64.0.0/10 (CGNAT), 224.0.0.0/4 (multicast), 240.0.0.0/4 (reserved).

FAQ

Why do I subtract 2 for usable hosts?

The first address in every IPv4 subnet is the network address and the last is the broadcast. Neither can be assigned to a device. That is why a /24 with 256 total addresses has 254 usable hosts.

What about /31 and /32?

RFC 3021 allows /31 for point-to-point links with both addresses usable (no broadcast). A /32 is a single host - usable for loopback or host routes but not a subnet in the traditional sense.

What is my public IP vs my private IP?

Your device usually has a private IP (something like 192.168.1.42) assigned by your router. The router then has a public IP assigned by your ISP. Private IPs are not visible on the internet - that is what network address translation (NAT) does. This tool calculates the subnet for whatever IP you enter; it does not look up your actual IP.

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) replaces the older class-based system. Instead of class A/B/C being implicit in the first octet, you write the number of network bits after a slash: /24, /16, /27. This lets networks be any size, not just three fixed sizes.

What is a wildcard mask and where is it used?

It is the bitwise inverse of the netmask. Where the netmask has 1s (network bits), the wildcard has 0s, and vice versa. Cisco ACLs and OSPF network statements use wildcard masks instead of netmasks.

Which IP class is my address?

Classful addressing is obsolete, but the labels are still used informally. Class A starts with 1-126, B with 128-191, C with 192-223, D with 224-239 (multicast), E with 240-255 (reserved). The class is now just a naming convention - the CIDR suffix controls the actual subnet.

Does this tool work with IPv6?

Not in this version. IPv6 addressing is 128 bits and uses different notation and subnetting rules. A dedicated IPv6 tool is planned.

Command line equivalent
# Linux
ipcalc 192.168.1.42/24
sipcalc 192.168.1.42/24

# macOS
ipcalc -n 192.168.1.42 255.255.255.0

# Python (built-in)
python3 -c 'import ipaddress; n = ipaddress.ip_network("192.168.1.42/24", strict=False); print(n.network_address, n.broadcast_address, n.netmask, n.num_addresses)'

# Node
node -e 'const net = require("net"); console.log(net.isIPv4("192.168.1.42"))'

# Online: search "subnet calculator" - but you are already here
Loads a test value into the form