Skip to main content

Subnet & CIDR IP Calculator

Calculate IP subnet mask, broadcast address, CIDR range, and usable host count

Presets:
Network IP
192.168.1.0 / 24
Subnet Mask
255.255.255.0
Broadcast IP
192.168.1.255
Usable Hosts
254

Subnet Calculation Breakdown

First Usable Host IP192.168.1.1
Last Usable Host IP192.168.1.254
Usable Host Range192.168.1.1 — 192.168.1.254
Total Addressable IPs256
Wildcard Mask0.0.0.255
Binary IP Representation11000000.10101000.00000001.00000001
Binary Subnet Mask11111111.11111111.11111111.00000000

Was this Subnet & CIDR IP Calculator helpful?

Help us keep tools reliable, fast, and bug-free.

What you can do with Subnet & CIDR IP Calculator

  • Calculate subnet range
  • Find broadcast ip
  • Calculate cidr block

What this network diagnostic measures

Calculate network address, broadcast address, netmask, and usable host range from an IP address and CIDR prefix.

Example input

192.168.1.130/26

Example output

Network 192.168.1.128, broadcast 192.168.1.191, netmask 255.255.255.192, 62 usable hosts

Practical workflow

  1. Enter an IPv4 address with its CIDR prefix (or pick the prefix separately).
  2. Read the computed network address, broadcast address, netmask, and wildcard mask.
  3. Use the usable host range to plan address assignments.

Common use cases

  • Plan VPC or LAN subnets and confirm how many hosts fit each prefix.
  • Copy the calculated network, broadcast address, mask, and usable range into a network change record.
  • Translate between CIDR prefixes and dotted netmasks while writing firewall rules.

Important notes and limitations

  • For prefixes up to /30, the network and broadcast addresses are reserved, leaving 2^(32-prefix) minus 2 usable hosts. A /31 provides both addresses for a point-to-point link, and a /32 identifies one host address.
  • All computation is local; IP addresses you enter are not transmitted.

Linux ipcalc & CIDR terminal equivalents

Calculate subnet breakdown with ipcalc

ipcalc 192.168.10.0/26

Calculates the network address, broadcast address, netmask, host min/max range, and total usable hosts for IPv4.

Query local interface CIDR and routes with ip route

ip -br -4 addr show && ip route show

Displays all active network interfaces with CIDR notation and kernel routing table destinations.

Subnet inspection with python ipaddress CLI

python3 -c "import ipaddress; n = ipaddress.IPv4Network('10.0.0.0/22'); print('Hosts:', n.num_addresses - 2, 'Broadcast:', n.broadcast_address)"

Standard library Python one-liner to calculate usable host counts and boundary addresses without external dependencies.

Subnetting errors & IP routing troubleshooting

InvalidSubnetError: Host bits set in network address

Cause: Specifying a network prefix where bits beyond the subnet mask are 1 (e.g. 192.168.1.1/24 instead of 192.168.1.0/24).

Solution: Apply bitwise AND with the subnet mask to determine the true network address before defining firewall rules or routing tables.

Host count discrepancy in AWS/GCP VPC subnets

Cause: Cloud providers reserve the first 4 and last 1 IP addresses in every CIDR block for VPC gateway, DNS, and broadcast.

Solution: In AWS VPC, usable hosts are 2^(32-prefix) - 5, not the standard 2^(32-prefix) - 2 RFC 1878 calculation.

Continue your workflow

Frequently asked questions

How many usable hosts does a /26 subnet have?

62. A /26 leaves 6 host bits (64 addresses), minus the network and broadcast addresses. The calculator shows this instantly for any prefix, along with the exact usable range.

What is the difference between netmask and wildcard mask?

The netmask marks the network bits (255.255.255.192 for /26); the wildcard mask is its inverse (0.0.0.63) and is used in ACL syntax on some routers. The calculator shows both.

Does the calculator send my IP ranges anywhere?

No. Everything is computed locally in your browser, so internal network layouts stay private.