IPv4 CIDR Subnet Calculator

Find the network address, broadcast address, usable host range and wildcard mask for any IPv4 CIDR block or subnet mask.

Free · Instant · Private
Quick answer: The network address is IP AND subnet mask; the broadcast address is network OR wildcard mask. A block has 2(32 − prefix) addresses, and prefixes from /0 to /30 have two fewer usable hosts because the network and broadcast addresses are reserved. For example, 192.168.1.130/26 is in 192.168.1.128/26 with 62 usable hosts.
Enter an IPv4 address and a prefix length
Enter an IPv4 address and a dotted subnet mask
Network block
192.168.1.128/26
Network address192.168.1.128
Broadcast address192.168.1.191
First usable host192.168.1.129
Last usable host192.168.1.190
Subnet mask255.255.255.192
Wildcard mask0.0.0.63
Total addresses64
Usable hosts62
Address typePrivate (RFC 1918)
Binary address11000000.10101000.00000001.10000010
Binary mask11111111.11111111.11111111.11000000
Host share of block96.88%

Split this network into smaller subnets

Choose a longer prefix to divide the block into equal-size child networks. The table is capped at 64 rows for readability; use the CSV button to copy what is shown.

  4 subnets
NetworkMaskFirst hostLast hostBroadcastUsable

Full IPv4 prefix reference table

Every prefix from /0 to /32 with its dotted mask, block size and usable host count.

PrefixSubnet maskAddressesUsable hosts

What CIDR Notation Means

Classless Inter-Domain Routing (CIDR) writes an IPv4 address followed by a slash and a prefix length, such as 192.168.1.128/26. The prefix is the number of leading one bits in the subnet mask. An IPv4 address is 32 bits wide, so a /26 mask has 26 network bits and 6 host bits. CIDR replaced the rigid class A, B and C system and is specified in RFC 4632.

The same boundary can be written as a dotted decimal mask. A /26 mask is 11111111.11111111.11111111.11000000 in binary, which is 255.255.255.192. The two notations carry identical information; this calculator accepts either one.

The Four Core Formulas

QuantityFormulaExample: 192.168.1.130/26
Subnet maskP ones followed by (32 − P) zeros255.255.255.192
Network addressIP AND mask192.168.1.128
Wildcard maskNOT mask0.0.0.63
Broadcast addressnetwork OR wildcard192.168.1.191
Total addresses2(32 − P)64
Usable hosts (/0 to /30)2(32 − P) − 262
Host rangenetwork + 1 through broadcast − 1192.168.1.129 to 192.168.1.190

The two reserved addresses are the network address, which identifies the block itself, and the directed broadcast address, which reaches every host in it. Modern networks rarely use directed broadcast, but both remain reserved by convention for prefixes up to /30.

In practice the whole calculation is four ordered steps:

  1. Write the prefix as a 32-bit mask of consecutive ones.
  2. AND the mask with the address to get the network address.
  3. OR the network address with the inverted mask to get the broadcast address.
  4. Add one to the network and subtract one from the broadcast to get the usable host range.

Prefix Reference for Common Sizes

PrefixMaskAddressesUsable hostsTypical use
/00.0.0.04,294,967,2964,294,967,294Default route, entire IPv4 space
/8255.0.0.016,777,21616,777,214Large private block 10.0.0.0/8
/16255.255.0.065,53665,534Campus network
/24255.255.255.0256254Common home or small office LAN
/26255.255.255.1926462Small server or device VLAN
/28255.255.255.2401614Small cloud subnet
/30255.255.255.25242Traditional point-to-point link
/31255.255.255.25422Point-to-point link per RFC 3021
/32255.255.255.25511Single host route or loopback

Special Address Ranges Worth Knowing

RangePurposeSpecification
10.0.0.0/8Private address spaceRFC 1918
172.16.0.0/12Private address space (172.16.0.0 to 172.31.255.255)RFC 1918
192.168.0.0/16Private address spaceRFC 1918
127.0.0.0/8LoopbackRFC 1122
169.254.0.0/16Link-local autoconfigurationRFC 3927
100.64.0.0/10Shared address space for carrier-grade NATRFC 6598
192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24Documentation and examplesRFC 5737
224.0.0.0/4MulticastRFC 1112

Worked Examples

Example 1: 192.168.1.130/26

The /26 mask is 255.255.255.192. A bitwise AND gives network 192.168.1.128. The wildcard mask is 0.0.0.63, so the broadcast is 192.168.1.191. The usable range is 192.168.1.129 through 192.168.1.190, giving 62 usable hosts out of 64 addresses.

Example 2: splitting 192.168.1.0/24 into /26 blocks

Increasing the prefix from /24 to /26 adds two network bits, so the block splits into 22 = 4 child networks of 64 addresses each: 192.168.1.0/26, 192.168.1.64/26, 192.168.1.128/26 and 192.168.1.192/26. Use the split table above to reproduce this result.

Example 3: a /31 point-to-point link

10.0.0.0/31 has exactly two addresses: 10.0.0.0 and 10.0.0.1. Under the traditional rule of subtracting two, it would have zero usable hosts. RFC 3021 removes the network and broadcast addresses for point-to-point links, so both addresses are usable and this calculator reports 2.

Example 4: a /32 host route

203.0.113.5/32 has a mask of 255.255.255.255 and exactly one address, used for a single host route or a loopback. This calculator reports 1 usable host and 203.0.113.5 as both the first and last host.

Common Mistakes

  • Confusing the address with the network. 192.168.1.130/26 is a host address; the network is 192.168.1.128/26. Routing tables use the network form.
  • Forgetting the two reserved addresses. A /24 has 256 addresses but only 254 usable hosts on a normal broadcast network.
  • Using a non-contiguous mask. Masks such as 255.0.255.0 are invalid in CIDR because all one bits must be consecutive from the left.
  • Mixing up the wildcard mask. A wildcard mask is the bitwise inverse of the subnet mask; it is not the same as the host portion written in decimal.
  • Assuming private means unroutable everywhere. RFC 1918 addresses are not routed on the public internet, but they route normally inside private networks and VPNs.
  • Applying the subtract-two rule to /31 and /32. Those prefixes have RFC 3021 and host-route exceptions.

Key Takeaways

  • Network address = IP AND mask; broadcast address = network OR wildcard mask.
  • A block holds 2 raised to the power of (32 minus prefix) addresses.
  • For /0 through /30, usable hosts equal total addresses minus 2.
  • /31 gives 2 usable hosts on point-to-point links and /32 gives 1.
  • RFC 1918 private ranges are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.

Authoritative References

  • RFC 4632, Classless Inter-Domain Routing (CIDR) - prefix notation and address aggregation.
  • RFC 1918, Address Allocation for Private Internets - the three private address blocks.
  • RFC 3021, Using 31-Bit Prefixes on IPv4 Point-to-Point Links - the /31 host-count exception.
  • RFC 3927, Dynamic Configuration of IPv4 Link-Local Addresses - the 169.254.0.0/16 block.
  • RFC 5737, IPv4 Address Blocks Reserved for Documentation - the example ranges.

Last updated: December 2, 2026 · All calculations are performed locally in your browser. No data is stored or transmitted.

IPv4 Subnet Calculator FAQ

How many usable hosts are in a /24?

A /24 contains 256 addresses and 254 usable hosts. The network address and the broadcast address are reserved, so 256 minus 2 equals 254.

What is the subnet mask for /26?

The subnet mask for /26 is 255.255.255.192, which in binary is 26 ones followed by 6 zeros. Its wildcard mask is 0.0.0.63.

How is the network address calculated?

The network address is the bitwise AND of the IP address and the subnet mask. For example, 192.168.1.130 AND 255.255.255.192 equals 192.168.1.128.

What is a wildcard mask?

A wildcard mask is the bitwise inverse of the subnet mask. For 255.255.255.252 the wildcard mask is 0.0.0.3. Wildcard masks are used in access control lists and in some routing protocol configurations.

What are the RFC 1918 private IP ranges?

RFC 1918 defines three private ranges: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. These addresses are not routed on the public internet.

How many hosts does a /31 or /32 support?

A /32 is a single host route with one address. A /31 has two addresses, and RFC 3021 allows both to be used on point-to-point links, so it has two usable hosts instead of zero.

What is the difference between a CIDR prefix and a subnet mask?

They describe the same boundary in two notations. A CIDR prefix counts the leading one bits, such as /24, while a subnet mask writes those bits as four dotted decimal octets, such as 255.255.255.0.

Is this subnet calculator free and private?

Yes. It is free with no signup, and all address calculations run locally in your browser. No IP addresses are uploaded or stored.