Skip to content

IPv4 Subnet Calculator

Calculate subnets, host ranges, and network addresses instantly

Enter a network

Calculation Results

Enter an IP address and subnet mask to see results.

Common Subnet Masks Reference

CIDRSubnet MaskHostsUse Case
/8255.0.0.016,777,214Large networks, ISPs
/16255.255.0.065,534Enterprise LANs
/24255.255.255.0254Small offices, VLANs
/27255.255.255.22430Branch offices
/30255.255.255.2522Point-to-point links
/32255.255.255.2551Host route

How to use the IPv4 subnet calculator

  1. Enter any IPv4 address in the network, such as 192.168.1.100.
  2. Enter the subnet mask in CIDR notation (/24) or dotted-decimal format (255.255.255.0).
  3. Results appear instantly as you type. Save calculations to your history or export them to CSV.

Tip: you can share a calculation by copying the page URL. Results are encoded in the link, for example /ipv4-subnet-calculator/?ip=10.0.0.1&mask=16.

Understanding your results

  • Network address — the first address in the subnet. It identifies the subnet itself and is used in routing tables.
  • Broadcast address — the last address in the subnet, used to reach every host at once.
  • Host range — the first through last addresses you can assign to devices.
  • Number of hosts — how many devices the subnet can hold.
  • Wildcard mask — the inverse of the subnet mask, used in ACLs and routing protocols.
  • Address type — whether the address is private (RFC 1918), public, loopback, link-local, and so on.

How subnet sizes are calculated

An IPv4 address is 32 bits long. The prefix length (the number after the slash) tells you how many of those bits identify the network; the remaining bits identify hosts. A subnet with prefix n contains 232−n addresses, and two of them are reserved for the network and broadcast addresses.

For example, a /24 subnet leaves 8 host bits: 28 = 256 addresses, or 254 usable hosts. Each step up in prefix length halves the subnet: a /25 has 126 usable hosts, a /26 has 62, and so on.

IPv4 CIDR cheat sheet

CIDRSubnet MaskWildcardAddressesUsable Hosts
/8255.0.0.00.255.255.25516,777,21616,777,214
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011

Planning more than one subnet? The free Network Planner checks your subnets for overlaps, and our guide to subnet planning best practices covers how to design an addressing scheme that scales.

Frequently Asked Questions

What is a /24 subnet?

A /24 subnet uses the subnet mask 255.255.255.0, meaning the first 24 bits identify the network and the last 8 bits identify hosts. It contains 256 addresses, 254 of which can be assigned to devices. See our guide What Is a /24 Subnet? for a full explanation.

How many usable hosts are in a subnet?

Subtract the prefix length from 32 and raise 2 to that power, then subtract 2 for the network and broadcast addresses: usable hosts = 2^(32 − prefix) − 2. A /24 has 254 usable hosts, a /26 has 62, and a /30 has 2. The exceptions are /31 (2 usable addresses on point-to-point links) and /32 (a single host).

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

They describe the same thing in two formats. A subnet mask writes the network bits as a dotted address (255.255.255.0), while CIDR notation simply counts them (/24). This calculator accepts either format.

Why are the network and broadcast addresses not usable?

The first address in a subnet identifies the network itself and the last address is used to reach every host on the subnet at once (broadcast). Neither can be assigned to a device, which is why a subnet has two fewer usable hosts than total addresses.

What is a wildcard mask?

A wildcard mask is the inverse of the subnet mask. Where the subnet mask has 1s, the wildcard mask has 0s. For a /24, the subnet mask is 255.255.255.0 and the wildcard mask is 0.0.0.255. Wildcard masks are commonly used in access control lists and OSPF configuration.

Which IP address ranges are private?

RFC 1918 reserves three ranges for private networks: 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 and are used inside homes and organizations. The calculator labels the address type for every result.

Is this subnet calculator free?

Yes. The IPv4 Subnet Calculator is completely free, requires no signup, and runs entirely in your browser. To track subnets and IP assignments for your whole team, you can create a free Subnet24 account.

More free tools

Track every subnet, not just calculate it

Subnet24 keeps your whole team's IP address plan in sync with real-time scanning and conflict prevention.

Get Your Free Account!

4 Subnets free forever | No credit card required