Subnet Calculator

Calculate a subnet from CIDR notation. Enter an IP with a prefix length (e.g. 192.168.1.0/24) to get the network and broadcast addresses, subnet mask, usable host range, total hosts and wildcard mask.

Subnet Calculator
Enter an IP in CIDR notation, e.g. 192.168.1.1/24

What the Subnet Calculator does

A subnet calculator turns CIDR notation into the full picture of a network. CIDR (Classless Inter-Domain Routing) writes an address with a prefix length — the /24 in 192.168.1.0/24 means the first 24 bits identify the network and the remaining 8 bits identify hosts within it.

From that single value this tool derives the network address, the subnet mask, the broadcast address, the first and last usable host, the total number of hosts, and the wildcard mask used in ACLs — everything you need to plan or verify an IP range.

How to read the results

  • Network — the base address of the subnet (all host bits zero); it identifies the network itself.
  • Subnet Mask — which bits are network vs host, in dotted-decimal (e.g. 255.255.255.0 for /24).
  • First / Last Host — the usable range you can assign to devices.
  • Broadcast — the all-ones host address; traffic sent here reaches every host on the subnet.
  • Total Hosts — usable addresses = 2^(32−prefix) − 2 (network and broadcast are reserved).

Worked example

Input: 192.168.1.10/24

Network     192.168.1.0/24
Subnet Mask 255.255.255.0
First Host  192.168.1.1
Last Host   192.168.1.254
Broadcast   192.168.1.255
Total Hosts 254

A /24 gives 256 total addresses; subtract the network (.0) and broadcast (.255) and you can assign 254 usable host addresses from .1 to .254.

Common use cases

  • Plan IP address ranges when designing or segmenting a network.
  • Work out how many hosts a given prefix length supports.
  • Split a larger block into smaller subnets (VLSM).
  • Derive the wildcard mask for router and firewall ACLs.
  • Double-check that a device's IP falls inside the intended subnet.

Subnet Calculator — Frequently Asked Questions

What does /24 mean in an IP address?

The /24 is the CIDR prefix length: the first 24 bits are the network portion and the remaining 8 bits address hosts. A /24 therefore covers 256 addresses (254 usable), with a subnet mask of 255.255.255.0.

Why are two addresses subtracted from the host count?

Every subnet reserves its first address as the network identifier and its last as the broadcast address, so neither can be assigned to a device. That's why usable hosts equal 2^(32−prefix) − 2 — for example a /24 has 256 − 2 = 254 usable hosts.

What is a wildcard mask?

A wildcard mask is the bitwise inverse of the subnet mask (e.g. 0.0.0.255 for a /24). Access control lists on Cisco-style devices use it to specify which address bits to match, making it handy for firewall and routing rules.