Skip to main content
Develop Tools
← Return to usage guide

Check the number of available IPs | Complete guide to usage, settings, and troubleshooting

To calculate the number of usable addresses, first calculate the total with 2^(32-prefix), then determine which rules apply: a standard subnet, /31, /32, or a cloud provider's rules.

Diagram showing the network address, usable range, and last address derived from a CIDR
Diagram showing the network address, usable range, and last address derived from a CIDR

Check the network range from an IP address and CIDR

Calculate IPv4 and IPv6 Networks, Address Ranges, Prefixes, Masks, and Host counts entirely in the browser.

Check the number of available IPs

Conclusion: Total addresses are 2^(32-prefix); typical usable addresses are Total-2 through /30

/24 is 256 and 254; /28 is 16 and 14; /30 is 4 and 2.

A /31 can be treated as two addresses for RFC 3021 point-to-point use, and a /32 as a single address, so do not mechanically apply total minus two.

Separate the input IP and normalized Network, and check Total Address Count and available Host Count separately.

Calculate the total number of addresses from host bits

IPv4 is 32 bits, so host bits are 32-prefix. If host bits are 8, 2^8=256; if 4, 16; if 2, 4.

Unlike general subnets, AWS reserves the first four and final one addresses, for a total of five. Check provider documentation for exceptions such as BYOIP.

Account to checkWhat to checkjudgment
/24Host 8bit256 / 254
/28Host 4bit16 / 14
/30Host 2bit4 / 2
/31 · /32Special2 / 1

How to verify results with the CIDR and subnet calculator

  1. Enter the CIDR to check.
  2. Check Host Bits and the total number of addresses.
  3. Check the available count and special Prefix Notice.
  4. For a Provider environment, compare reserved counts with the official specification.

The tool's usable-host count follows general subnet rules and RFC 3021. There is no AWS-specific 251-display mode.

CIDR quick reference table

CIDRTotalTraditional host
/24256254
/25128126
/266462
/273230
/281614
/2986
/3042

Read the input IP, network, total count, and usable count separately.

The input IP in 192.168.1.130/24 is 192.168.1.130, but the network address is 192.168.1.0. The part before the CIDR slash is not always the network address. The network address is obtained by ANDing the IP and mask, and the final address in typical IPv4 is obtained with network OR wildcard.

exampleNetworkLast / BroadcastTotalTraditionally usable
192.168.1.130/24192.168.1.0192.168.1.255256254
192.168.1.130/26192.168.1.128192.168.1.1916462
192.0.2.0/31192.0.2.0192.0.2.12In P2P, use 2
192.0.2.1/32192.0.2.1192.0.2.11Single address

The total number of IPv4 /n addresses is 2^(32-n). In traditional broadcast subnets, Total-2 is often assignable to hosts, but this cannot be applied uniformly to /31, /32, or cloud provider reserved addresses. IPv6 has no broadcast address equivalent to IPv4, so the tool displays the network range and total for IPv6 and does not describe it as broadcast.

How to isolate unexpected calculation results

If the counts do not match, check whether total and assignable are being confused and whether you missed addresses reserved independently by network devices or the cloud.

Fix the input IP version, each octet, prefix, mask continuity, and network boundary in order. Because some applications accept a host address plus prefix while others accept only a canonical network CIDR, compare the normalized result as well.

  • Record the total count and host count in separate fields
  • Treat /31 and /32 as special cases.
  • Include headroom for gateways and HA
  • Check the Provider's official reserved counts.

Supported scope of the current CIDR and subnet calculator

The current DevelopTools tool parses IPv4 and IPv6 IP addresses and prefixes with BigInt, displaying normalized CIDR, network start and end, total address count, usable range, and address type. For IPv4, it also shows the subnet mask, wildcard mask, broadcast address, and binary network and host portions. Input values are calculated only in the browser; it does not send data to external APIs, connect to target IPs, ping, perform WHOIS lookups, or scan ports. Only theme settings are saved to localStorage.

FunctionCurrent tool operation
Basic calculationIPv4 / IPv6, CIDR or IPv4 subnet mask input, normalized CIDR, first and last addresses, total and available counts
IPv4 displaySubnet mask, wildcard, broadcast, binary IP and mask, network bits and host bits
Special prefixesDisplay /31 as two usable addresses for RFC 3021 point-to-point use and /32 as a single address.
CategoryDistinguish RFC1918, CGNAT, Loopback, Link-local, Multicast, Documentation, Reserved, and similar ranges.
Supplementary featuresSplit a subnet into equal-sized subnets, save up to 4,096 entries as CSV, and check whether an IP belongs within a CIDR.
Not implementedAutomatic overlap comparison for two CIDRs, automatic reverse calculation from required host counts, AWS-specific mode, automatic VLSM design, and automatic conversion from arbitrary IP ranges to CIDR

For articles covering unimplemented calculations, explain the approach and manual calculation, then use the current tool to calculate candidate CIDRs one at a time and verify the range, total count, and membership. Do not describe nonexistent dedicated buttons or auto-detection features.

Check RFCs and official Provider documentation.

Use RFC 4632 for CIDR fundamentals, RFC 3021 for IPv4 point-to-point /31 networks, and RFC 1918 for private IPv4 addresses. AWS reserved addresses and permitted prefixes may change, so check the official AWS documentation current at the time of design.

Example: check the usable-host count for /28

Host Bits is 4, so the total is 16.

A typical IPv4 broadcast subnet has 14 hosts excluding the network and broadcast addresses.

  1. Calculate 32-28
  2. Calculate 2^4
  3. Normally subtract 2
  4. Check environment-specific reserved words

Do not use "16 items" and "14 hosts" to mean the same thing.

Frequently asked questions

How many IP addresses are in a /24?
There are 256 total addresses. In a traditional IPv4 Subnet, 254 can be used for Hosts after excluding the Network Address and Broadcast Address. However, AWS and others have additional reserved Addresses.
Are there zero usable IP addresses in a /31?
Not necessarily 0. On RFC 3021 Point-to-Point Links, both Addresses can be used as Endpoints. Check your environment and device support.
Are all 172.x.x.x addresses private IPs?
No. The RFC 1918 Private Range is 172.16.0.0/12, meaning 172.16.0.0–172.31.255.255.
What is the network address of 10.0.0.5/24?
It is 10.0.0.0/24. If the input IP is a host address, the value before the slash will not match the normalized network address.