Subnet Calculator

Calculate IPv4 subnet details including CIDR, subnet mask, network address, broadcast address, wildcard mask, host range, and usable hosts.

Subnet inputs

Calculate an IPv4 subnet

Enter an IP address with a CIDR prefix, or switch to subnet mask mode and enter a dotted-decimal mask.

You can paste CIDR notation directly, such as 192.168.1.10/24.

Use /0 through /32. Changing CIDR updates the subnet mask.

Valid masks are contiguous, such as 255.255.255.0.

Network address

192.168.1.0

192.168.1.0/24

Broadcast address

192.168.1.255

Last address in this subnet.

Usable host range

192.168.1.1 - 192.168.1.254

First and last usable host addresses.

Usable hosts

254

256 total addresses.

Subnet mask

255.255.255.0

/24 prefix length.

Wildcard mask

0.0.0.255

Inverse of the subnet mask.

Detailed subnet breakdown

A compact table for network planning, firewall notes, and documentation.

Input IP192.168.1.10
CIDR notation192.168.1.0/24
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
Network address192.168.1.0
Broadcast address192.168.1.255
First usable host192.168.1.1
Last usable host192.168.1.254
Total addresses256
Usable hosts254
Network bits24
Host bits8
IP classClass C
Private/publicPrivate IPv4 range

Binary representation

Each octet is padded to 8 bits so the mask boundary is easier to inspect.

IP address

11000000.10101000.00000001.00001010

Subnet mask

11111111.11111111.11111111.00000000

Network address

11000000.10101000.00000001.00000000

Broadcast address

11000000.10101000.00000001.11111111

Reference

CIDR quick reference

CIDRSubnet maskTotal addressesUsable hosts
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422
/32255.255.255.25511

Support

Subnet interpretation

IPv4 subnet formula

The calculator converts the IP and subnet mask to 32-bit numbers, then applies bitwise operations to find the network and broadcast range.

CIDR to mask conversion

A prefix such as /24 means 24 leading mask bits are set to 1, creating 255.255.255.0.

Host range estimate

Ordinary subnets reserve the network and broadcast addresses, so usable hosts are total addresses minus 2.

/31 and /32 edge cases

Point-to-point /31 subnets and single-host /32 routes are shown with their common networking interpretations.

Education

IPv4 subnetting basics

What is a subnet calculator?

It helps turn an IPv4 address and prefix into the subnet details needed for routing, firewall rules, address planning, and documentation.

What is CIDR notation?

CIDR writes the network size after a slash. For example, 192.168.1.10/24 means the first 24 bits identify the network.

How subnet masks work

Mask bits set to 1 keep the network portion. Mask bits set to 0 leave the host portion available for devices.

Network vs broadcast

The network address identifies the subnet. The broadcast address is the final address in a traditional IPv4 subnet.

Usable host range

For /0 through /30, the first usable host is network + 1 and the last usable host is broadcast - 1.

Wildcard mask

The wildcard mask is the inverse of the subnet mask and is useful when writing some routing and access-list rules.

Private vs public ranges

Private IPv4 ranges include 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.

/31 and /32 notes

/31 can be used on point-to-point links. /32 identifies one exact host route.

Limitations

This version supports IPv4 only and does not calculate IPv6, VLSM plans, route aggregation, or multiple subnet splits.

FAQ

Subnet calculator questions

A subnet calculator takes an IPv4 address and CIDR prefix or subnet mask, then calculates the network address, broadcast address, usable host range, and related subnet details.