Subnet Calculator

Calculate mask, IP range, host count by CIDR notation.

Enter IP address with CIDR (e.g. 192.168.1.0/24) or just IP (default /24)

IPv4 subnet calculator: mask, network, broadcast and hosts

Enter an IP address with a prefix, such as 192.168.10.77/26, or just an IP (then /24 is assumed). The calculator finds the network and broadcast addresses, first and last host, host count, subnet mask and wildcard mask, shows the mask and address in binary and marks RFC 1918 private ranges. IPv4 only.

Subnet mask and wildcard mask
Network, broadcast and host range
Mask and IP address in binary
Mask reference table from /16 to /32

How to Use

  1. Enter an IP address with a prefix, e.g. 192.168.10.77/26
  2. Without a prefix the calculator assumes /24
  3. Read the mask, network address, broadcast and host range

Use Cases

  • Plan subnet segmentation for infrastructure and environments.
  • Prepare firewall and ACL rules based on IP ranges.

Limitations

  • Focused on IPv4 CIDR calculations.
  • Does not analyze real BGP routes or host reachability.

Example Input / Output

Example Input
192.168.10.0/26
Example Output
Mask 255.255.255.192, Host range 192.168.10.1-62, Broadcast 192.168.10.63.

FAQ

The prefix is the number of ones in the mask. /24 is 24 ones, which is 255.255.255.0; /26 is 255.255.255.192. Enter an address with a prefix and the calculator shows the mask in decimal and binary.

The formula is 2^(32 − prefix) − 2, because the network and broadcast addresses are not assigned to devices. A /24 has 254 hosts, a /26 has 62, a /28 has 14. The exceptions are /31 (2 addresses for point-to-point links) and /32 (a single address).

It is the inverted subnet mask: for 255.255.255.192 it is 0.0.0.63. It is used in Cisco access lists and OSPF configuration.

Each extra prefix bit halves the network: a /24 becomes two /25s with 126 hosts, four /26s with 62 or eight /27s with 30. For example, 192.168.1.0/24 splits into .0/26, .64/26, .128/26 and .192/26.

This page is for configuring a network around a specific address: mask, wildcard, binary form, class. The CIDR calculator turns a block such as 203.0.113.0/22 into an IP range and counts every address in it.

How to use the subnet calculator

Enter an IPv4 address with a prefix, for example 192.168.10.77/26. The address does not have to be the start of the network: the calculator finds the network it belongs to. Leave the prefix out and it assumes /24 (255.255.255.0). The calculator handles IPv4 only.

What each field means

  • Subnet mask is the prefix length written in dotted decimal: /26 = 255.255.255.192.
  • Wildcard mask is the inverted mask (0.0.0.63 for a /26), used in Cisco access lists and OSPF configuration.
  • Network address is the first address of the block and names the subnet itself. It is not assigned to a device.
  • Broadcast is the last address of the block. Not for devices either.
  • First and last host give the range you can assign to devices.
  • Number of hosts is 2(32 − prefix) − 2. /31 and /32 follow different rules, see below.
  • Class shows “Private” for the RFC 1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16). Everything else is labelled “Public”, including 127.0.0.0/8 (localhost) and 100.64.0.0/10 (carrier-grade NAT), even though neither is reachable from the internet.
  • Binary mask and address: ones in the mask are the network part, zeros are the host part.

Worked example: 192.168.10.77/26

Mask255.255.255.192
Wildcard0.0.0.63
Network192.168.10.64
Broadcast192.168.10.127
Hosts192.168.10.65 – 192.168.10.126, 62 in total

The mental shortcut: the last non-zero octet of the mask is 192, so the block size is 256 − 192 = 64. Blocks start at 0, 64, 128 and 192. Address .77 falls into 64–127. The first address is the network, the last is the broadcast, and everything in between is usable.

Subnet mask cheat sheet

PrefixMaskHostsTypical use
/8255.0.0.016,777,214The whole 10.0.0.0 network
/16255.255.0.065,534Large corporate network, cloud VPC
/22255.255.252.01,022Campus, guest Wi-Fi
/23255.255.254.0510Office floor
/24255.255.255.0254Home network, small office
/25255.255.255.128126Half of a /24
/26255.255.255.19262Department, VLAN
/27255.255.255.22430Small VLAN
/28255.255.255.24014Address block from an ISP
/29255.255.255.2486A few static public IPs
/30255.255.255.2522Link between two routers
/31255.255.255.2542Point-to-point link (RFC 3021)
/32255.255.255.2551Single address: loopback, firewall rule

How to split a network into subnets

Every extra prefix bit halves the network. To split 192.168.1.0/24 into four, you need 2 bits (2² = 4), which gives /26 subnets: .0/26, .64/26, .128/26 and .192/26, 62 hosts each.

If you start from the number of devices, pick the smallest block with room to spare. 50 devices fit a /26 (62 hosts), 100 a /25 (126), 300 a /23 (510). Leave headroom for printers, access points and growth.

Why /31 and /32 are different

A /31 has only two addresses; take away network and broadcast and nothing is left. RFC 3021 therefore lets point-to-point links use both, and the calculator shows 2 hosts. A /32 is one specific address, used in routes, firewall rules and loopback interfaces.

Subnet calculator or CIDR calculator?

Use this page when you configure a network: mask, wildcard, binary form and host range for a given address. If you need to turn a block such as 203.0.113.0/22 into an address range and count every IP in it, the CIDR calculator is quicker. To convert an address to binary, hex or integer form, use the IP converter.

Cascade link promotion for your site $30 bonusBacklinks 5→50→5000 across 100+ platforms. From $30 to start, plus a $30 bonus for newcomers.