Skip to content

IP addressing made simple

Subnet Calculator

Calculate network details for any IPv4 or IPv6 address and CIDR prefix. Get the network address, subnet mask, usable hosts, and broadcast instantly.

  • Instant results
  • Visual representation
  • Learn with examples
  • Free to use
Diagram of 192.168.1.0/24: network 192.168.1.0, usable range 192.168.1.1 to 192.168.1.254, broadcast 192.168.1.255, with 24 network bits and 8 host bits.
Try an example
CIDR Prefix

CIDR prefix

A single host

11000000101010000000000100000000
/32
/8/16/24/32
Network bitsHost bits

Drag the line, or use the arrow keys. The result updates as it moves.

Results

Network details for 192.168.1.0/32

Network Address

192.168.1.0

Broadcast Address

192.168.1.0

Subnet Mask

255.255.255.255

Total Addresses

1

Usable Hosts

1

First Host

192.168.1.0

Last Host

192.168.1.0

Wildcard Mask

0.0.0.0

Binary Representation

IP Address
11000000.10101000.00000001.00000000
Subnet Mask
11111111.11111111.11111111.11111111
Network Address
11000000.10101000.00000001.00000000
Broadcast Address
11000000.10101000.00000001.00000000

Visual Representation

32 network bits
132

A /32 names one address. Network, first host, and broadcast are the same value.

Common CIDR Prefixes

Quick reference table of common IPv4 CIDR prefixes.

Common IPv4 prefixes from /24 to /32
CIDRSubnet MaskTotal AddressesUsable Hosts
/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
View complete CIDR reference →

Frequently Asked Questions

Common questions about subnetting and IP addressing.

View all FAQs →

A subnet is a contiguous block of IP addresses that share the same network prefix. The prefix length says how many leading bits are the network. The remaining bits distinguish hosts inside that block.

CIDR notation writes an address and a prefix length, as in 192.168.1.0/24. The /24 means the first 24 bits are the network. That prefix is the subnet mask 255.255.255.0.

For a conventional IPv4 prefix from /0 through /30, usable hosts are 2 to the power of the host bits, minus 2. The network address and the broadcast are the two addresses that are not hosts. A /24 has 8 host bits, so 256 total addresses and 254 usable hosts.

A /30 has 4 addresses and 2 usable hosts under the usual network-and-broadcast rule. A /31 also has 2 addresses, and RFC 3021 uses both of them as hosts on a point-to-point link. Subtracting 2 from a /31 would hide those hosts.

Host counts for /31 follow RFC 3021. Prefix rules follow RFC 4632. The method is written up on the methodology page.