IPAddress-Lookup.com

Subnet Calculator – IPv4 CIDR, Netmask & Range

Enter an IPv4 CIDR block below (for example, 192.168.1.0/24) and our subnet calculator instantly returns the netmask, wildcard mask, network address, broadcast address, usable host range, and host counts. It is a fast, free way to work out the details of any IP subnet.

Subnet details for 192.168.1.0/24
CIDR notation192.168.1.0/24
Netmask255.255.255.0
Wildcard mask0.0.0.255
Network address192.168.1.0
Broadcast192.168.1.255
First host192.168.1.1
Last host192.168.1.254
Total addresses256
Usable hosts254

What subnetting is and why it matters

Subnetting is the practice of dividing a larger IP network into smaller, logically separate networks called subnets. Rather than placing every device on one flat network, administrators carve address space into pieces that match the size and purpose of each segment.

  • Efficiency: allocate only as many addresses as a segment needs, reducing waste.
  • Performance: smaller broadcast domains mean less broadcast traffic on each segment.
  • Security and control: isolate departments, guests, or servers behind different subnets and apply firewall rules between them.

A subnet calculator takes the manual math out of this process so you can plan address space quickly and without errors.

CIDR notation explained

CIDR (Classless Inter-Domain Routing) notation describes a network as an address followed by a slash and a prefix length, such as /24. The prefix length is the number of leading bits that identify the network portion of a 32-bit IPv4 address; the remaining bits identify hosts. A shorter prefix like /8 covers a huge block, while a longer prefix like /30 defines a tiny four-address network. Prefixes from /8 to /30 are the ones you will use most often, and this CIDR calculator accepts any valid value in that range.

Subnet mask and wildcard mask

A subnet mask is the dotted-decimal form of the prefix length. A /24 prefix, for example, sets the first 24 bits to 1, producing the mask 255.255.255.0. The mask tells devices which part of an address is the network and which part is the host.

A wildcard mask is the bitwise inverse of the subnet mask. For /24 that is 0.0.0.255. Wildcard masks are commonly used in access control lists and routing configurations on Cisco-style equipment, where a 0 bit means "must match" and a 1 bit means "ignore."

Network, broadcast, and usable host range

Every subnet has three key kinds of address:

  • Network address: the first address in the block, with all host bits set to 0. It names the subnet itself and is not assigned to a device.
  • Broadcast address: the last address in the block, with all host bits set to 1. Traffic sent here reaches every host on the subnet and cannot be used by a single device.
  • Usable host range: every address between the network and broadcast addresses. These are the addresses you can assign to computers, servers, and other devices.

How host counts work

The number of total addresses in a subnet is 2 raised to the power of the host bits (32 minus the prefix length). A /24 leaves 8 host bits, so it contains 2^8 = 256 total addresses. Because the first address is the network address and the last is the broadcast address, the number of usable hosts is 256 − 2 = 254. This "minus two" rule applies to every ordinary subnet from /8 through /30.

Worked example: 192.168.1.0/26

Take the IP subnet 192.168.1.0/26. A /26 prefix leaves 6 host bits, so the block holds 2^6 = 64 total addresses and 62 usable hosts. The calculator returns:

  • Subnet mask: 255.255.255.192
  • Wildcard mask: 0.0.0.63
  • Network address: 192.168.1.0
  • Broadcast address: 192.168.1.63
  • Usable host range: 192.168.1.1 – 192.168.1.62

Private address ranges

Some address blocks are reserved for private use and are never routed on the public internet. If you are building an internal network, you will usually draw from one of these ranges:

  • 10.0.0.0/8 — 10.0.0.0 to 10.255.255.255
  • 172.16.0.0/12 — 172.16.0.0 to 172.31.255.255
  • 192.168.0.0/16 — 192.168.0.0 to 192.168.255.255

To see the public address your router presents to the internet instead, try our IP address lookup or check What Is My IPv4?.

Common prefixes and host counts

  • /30 — mask 255.255.255.252 — 4 total, 2 usable
  • /29 — mask 255.255.255.248 — 8 total, 6 usable
  • /28 — mask 255.255.255.240 — 16 total, 14 usable
  • /27 — mask 255.255.255.224 — 32 total, 30 usable
  • /26 — mask 255.255.255.192 — 64 total, 62 usable
  • /24 — mask 255.255.255.0 — 256 total, 254 usable
  • /16 — mask 255.255.0.0 — 65,536 total, 65,534 usable

Frequently asked questions

What is a subnet calculator used for?

A subnet calculator converts a CIDR block into its full set of network details, including the subnet mask, wildcard mask, network and broadcast addresses, usable host range, and host counts. It saves you from doing binary math by hand when planning or troubleshooting an IP subnet.

What is the difference between a subnet mask and a wildcard mask?

A subnet mask marks the network bits with 1s and host bits with 0s, such as 255.255.255.0 for a /24. A wildcard mask is its exact inverse, 0.0.0.255, and is used mainly in access control lists where a 0 bit means "match this bit" and a 1 bit means "ignore it."

Why does a /24 have 256 addresses but only 254 usable hosts?

A /24 leaves 8 host bits, giving 2^8 = 256 total addresses. The first address is reserved as the network address and the last as the broadcast address, so 256 − 2 = 254 addresses remain available to assign to devices.

What prefix lengths does this CIDR calculator support?

The tool accepts IPv4 prefixes from /8 through /30, covering everything from very large blocks down to small point-to-point links. Just enter an address and prefix, like 192.168.1.0/26, and the results appear instantly.

Which address ranges are private?

The reserved private IPv4 ranges are 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Addresses in these blocks are used on internal networks and are not routed across the public internet, which is why home and office networks rely on them.