Skip to content
All calculators

Subnet Calculator

Calculate network, broadcast, subnet mask and host range from an IP/CIDR.

Inputs

Results

Network address
192.168.1.0/24
IP class C · Private
FieldValue
IP address192.168.1.1
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
Network192.168.1.0/24
Broadcast address192.168.1.255
First usable host192.168.1.1
Last usable host192.168.1.254
Total hosts256
Usable hosts254
IP classC
ScopePrivate
IP in binary
11000000.10101000.00000001.00000001

What is the Subnet Calculator?

A subnet calculator takes an IP address with CIDR notation (e.g. 192.168.1.1/24) and instantly returns the network address, broadcast address, subnet mask, wildcard mask and the range of usable host IPs.

Subnet Calculator formula

Subnet mask = 32-bit mask with the first `prefix` bits set to 1 (e.g. /24 → 255.255.255.0). Network address = IP AND mask. Broadcast address = network OR NOT(mask). Total hosts = 2^(32 − prefix); usable hosts = total − 2 (network and broadcast are reserved).

How to use the Subnet calculator

  1. 1Enter the IPv4 address (e.g. 192.168.1.1).
  2. 2Enter the CIDR prefix length (0–32) after the slash, or pick from common presets (/24, /16, /8).
  3. 3Click Calculate to see the network address, broadcast, mask and host range.
  4. 4Use the wildcard mask for ACLs on Cisco-style equipment and the host count for capacity planning.
  5. 5For multiple subnets, repeat with each CIDR block.

Example calculation

For IP 192.168.1.1/24: the network address is 192.168.1.0, the broadcast address is 192.168.1.255, the subnet mask is 255.255.255.0, the wildcard mask is 0.0.0.255, and there are 254 usable host addresses (192.168.1.1 through 192.168.1.254).

Frequently asked questions

What is a /24 subnet?
A /24 (CIDR prefix 24) uses 24 bits for the network portion and 8 bits for hosts, giving a subnet mask of 255.255.255.0 and 2^8 − 2 = 254 usable host addresses. It is the most common home and small-office subnet.
How do I find the network and broadcast address?
Bitwise AND the IP with the subnet mask to get the network address; bitwise OR the network address with the wildcard (inverse) mask to get the broadcast. For 192.168.1.1/24: network = 192.168.1.0, broadcast = 192.168.1.255.
How many usable hosts are in a subnet?
Calculate 2^(32 − prefix) and subtract 2 (for the reserved network and broadcast addresses). A /24 has 254 usable hosts; a /26 has 62; a /30 has 2 (commonly used for point-to-point links).
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation writes an IP followed by a slash and the prefix length, e.g. 10.0.0.0/8. The prefix length is the number of leading 1 bits in the subnet mask, which replaces the older class A/B/C system.
What is a wildcard mask?
A wildcard mask is the inverse of a subnet mask (every bit flipped) and is used in Cisco ACLs and OSPF configuration. For 255.255.255.0, the wildcard mask is 0.0.0.255, meaning the last octet is ignored when matching addresses.

People also search for

  • subnet calculator CIDR
  • IP subnet calculator
  • IPv4 subnet calculator
  • network and broadcast address calculator
  • CIDR to subnet mask converter
  • subnet mask calculator
  • wildcard mask calculator
  • how many hosts in a subnet