IP Subnet Calculator - CIDR Network, Broadcast & Usable Host Range

This IP Subnet Calculator accepts an IPv4 address and CIDR prefix (or slash notation like 192.168.1.10/24) and returns the network address, broadcast address, first and last usable hosts, host count, subnet mask, wildcard mask, and a binary network view-IPv4 only.

IPv4 subnet input

Subnet details

IP address192.168.1.10
CIDR prefix/24
Network address192.168.1.0
Broadcast address192.168.1.255
Subnet mask255.255.255.0
Wildcard mask0.0.0.255
First usable host192.168.1.1
Last usable host192.168.1.254
Usable hosts254
Total addresses256

Binary view

Network
11000000101010000000000100000000
Broadcast
11000000101010000000000111111111

Edge cases

  • /31: 2 usable addresses (RFC 3021 point-to-point links).
  • /32: 1 usable address (single-host route).
  • IPv6: not supported - IPv4 only.

Common subnet sizes at a glance

CIDR Netmask Total addresses Usable hosts
/32 255.255.255.255 1 1
/31 255.255.255.254 2 2 (RFC 3021)
/30 255.255.255.252 4 2
/24 255.255.255.0 256 254
/8 255.0.0.0 16,777,216 16,777,214

How IPv4 subnetting works

Every IPv4 address is a 32-bit number split into a network portion and a host portion. The CIDR prefix tells you how many leading bits belong to the network. A /24 keeps 24 network bits and leaves 8 host bits-256 addresses total. Network engineers use subnet calculators to plan VLANs, AWS VPC CIDR blocks, firewall rules, and DHCP scopes without manual binary math.

This tool ANDs your IP with the subnet mask to find the network address, ORs with the wildcard mask for broadcast, and computes usable host bounds. For standard subnets (/30 and larger host spaces), the first and last addresses are reserved. /31 and /32 follow RFC conventions documented in the edge-case panel.

Wildcard masks and ACL planning

The wildcard mask is the bitwise inverse of the subnet mask-zeros match fixed network bits and ones match variable host bits. Network ACLs and Cisco-style access lists use wildcard notation to express permitted address ranges. This calculator outputs both masks side by side so you can copy values directly into cloud security groups or router configurations.

Subnet Calculator FAQ

How do I calculate a subnet from an IP and CIDR?

Convert the IP to a 32-bit integer, apply the subnet mask derived from the CIDR prefix (network bits set to 1), and AND the result to get the network address. The broadcast is the network OR'd with the inverted mask. Usable hosts sit between network+1 and broadcast−1 for prefixes /30 and smaller subnets, with special rules for /31 and /32.

What is CIDR notation?

Classless Inter-Domain Routing (CIDR) appends a slash and prefix length to an IP address-192.168.1.0/24 means the first 24 bits are the network portion and the remaining 8 bits identify hosts. A /24 subnet contains 256 total addresses (2⁸), typically yielding 254 usable hosts after reserving network and broadcast.

How many usable hosts does a /24 subnet have?

A /24 has 256 total addresses and 254 usable hosts (192.168.1.1 through 192.168.1.254 in a typical 192.168.1.0/24 network). The network address (.0) and broadcast address (.255) are reserved and cannot be assigned to hosts in standard subnets.

Subnet calculator vs ipcalc command line: which is faster?

The ipcalc utility is excellent on Linux servers but requires a terminal and manual flag memorization. This browser calculator is faster for quick lookups during network design, certification study, or cloud VPC planning-enter an IP and prefix, get every field instantly, and copy a summary without installing packages.

What about /31 and /32 subnets?

A /32 identifies a single host-network, broadcast, and host are the same address with one usable host. RFC 3021 defines /31 point-to-point links where both addresses are usable (no traditional network/broadcast reservation), so this calculator reports 2 usable hosts for /31. Document this choice when configuring routers.

Can I enter a dotted subnet mask instead of CIDR?

Yes. Provide a contiguous netmask such as 255.255.255.0 and the tool converts it to the equivalent /24 prefix. Non-contiguous masks (e.g., 255.0.255.0) are invalid in standard subnetting and will be rejected with an error message.

Sources & review

Last reviewed:

Related Dev Tools

Calculator hubs

Related guides