Subnet Calculator

Calculate IPv4 network addresses, broadcast addresses, subnet masks, CIDR ranges, wildcard masks, and usable hosts.

Built by a network engineerCalculations run locally in your browserNo signup requiredNetwork information is not transmitted to our servers

Subnet Calculator

/

Results

IP Address
192.168.10.50
CIDR
/24
Subnet Mask
255.255.255.0
Wildcard Mask
0.0.0.255
Network Address
192.168.10.0
Broadcast Address
192.168.10.255
First Usable Address
192.168.10.1
Last Usable Address
192.168.10.254
Total Addresses
256
Usable Hosts
254
Binary Subnet Mask
11111111.11111111.11111111.00000000
IP Class
C
Private/Public
Private (RFC 1918)

Subnet Visualization

N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
N
H
H
H
H
H
H
H
H
Network: 24 bitsHost: 8 bits
11111111.11111111.11111111.00000000

Split This Subnet

Divide 192.168.10.0/24 into smaller equal-sized child subnets. Select a target prefix to see all resulting sub-networks.

Subnet Size by Host Requirement

Enter the number of hosts you need and optionally a growth percentage. The calculator finds the smallest subnet that fits.

%

Recommended Prefix

/23

Subnet Mask

255.255.254.0

Usable Hosts

510

Total Addresses

512

Requested hosts:350
Unused capacity:160
Utilization:69%

CIDR Reference Table (/8 — /32)

CIDRSubnet MaskWildcardTotalUsable
/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

What the Subnet Calculator Does

The subnet calculator takes an IPv4 address and a CIDR prefix length as input and computes every key value you need to understand and configure a subnet: the network address, broadcast address, subnet mask, wildcard mask, first and last usable host addresses, total address count, usable host count, the binary representation of the subnet mask, the IP address class, and whether the address falls within an RFC 1918 private range. It also includes subnet splitting and a host-count sizing mode.

How the Calculation Works

Every IPv4 address is a 32-bit number. The CIDR prefix determines how many of those bits belong to the network portion versus the host portion. For example, in 192.168.10.50/24, the first 24 bits identify the network and the last 8 bits identify hosts within that network.

The subnet mask is created by setting the first n bits to 1 (where n is the CIDR prefix) and the rest to 0. The network address is found by performing a bitwise AND of the IP address and the subnet mask. The broadcast address is found by setting all host bits to 1. The wildcard mask is the bitwise inverse of the subnet mask.

Usable hosts equal total addresses minus 2 (the network and broadcast addresses) for prefixes from /1 to /30. The /31 prefix is a special case defined by RFC 3021 for point-to-point links, where both addresses are usable. The /32 prefix represents a single host with exactly 1 usable address.

Split This Subnet

Subnet splitting divides a larger network into smaller, equal-sized child subnets — a fixed-length subdivision. After calculating a subnet, use the “Split This Subnet” section to pick a smaller prefix and instantly see every resulting sub-network with its network address, subnet mask, wildcard mask, first and last usable host, broadcast address, total addresses, and usable host count. For example, splitting 10.10.0.0/22 into /24 blocks produces four subnets of 254 usable hosts each.

For variable-length subnet masking — allocating subnets of different sizes based on different host requirements — use the VLSM Calculator & Subnet Planner.

Host-Count Sizing

If you know how many hosts you need but not which prefix to use, enter the count in the “Subnet Size by Host Requirement” section. The calculator finds the smallest subnet that fits your requirement, optionally adjusted for growth. For example, 350 hosts requires a /23 (510 usable hosts), while 254 hosts fits exactly in a /24.

Note that /31 and /32 have special behavior: /31 follows RFC 3021 for point-to-point links (2 usable addresses, no broadcast), and /32 is a single host address. These are not general-purpose LAN subnets.

Related Tools

Example

For 192.168.10.50/24:

  • Network address: 192.168.10.0
  • Broadcast address: 192.168.10.255
  • Subnet mask: 255.255.255.0
  • Wildcard mask: 0.0.0.255
  • First usable: 192.168.10.1
  • Last usable: 192.168.10.254
  • Usable hosts: 254
  • IP class: C
  • Private/Public: Private (RFC 1918)

Common Use Cases

  • Planning subnet sizes for new VLANs or network segments
  • Verifying the correct network and broadcast addresses for DHCP scope configuration
  • Determining wildcard masks for Cisco ACLs and OSPF network statements
  • Validating whether two IPs are in the same subnet
  • Calculating how many hosts a given CIDR prefix supports before committing a design
  • Splitting a larger block into smaller subnets for efficient address allocation
  • Finding the right prefix size when you know the host count but not the CIDR

Important Considerations

The IP class system (A, B, C, D, E) is largely historical. Modern networks use CIDR exclusively, but class information remains useful for understanding default behaviors and legacy configurations. Private IP ranges defined by RFC 1918 (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) are not routable on the public internet and are used for internal networks. Always verify that your subnetting plan leaves room for growth and aligns with your organization’s IP addressing policy.

Related tools

Frequently Asked Questions

What is a subnet calculator?

A subnet calculator takes an IPv4 address and a CIDR prefix (or subnet mask) and computes the network address, broadcast address, subnet mask, wildcard mask, first and last usable host addresses, and the total number of usable hosts for that subnet.

What is CIDR notation?

CIDR (Classless Inter-Domain Routing) notation expresses a subnet by appending a slash and a prefix length to an IP address, for example 192.168.1.0/24. The /24 means the first 24 bits are the network portion and the remaining 8 bits are the host portion, allowing 254 usable hosts.

What is the difference between total addresses and usable hosts?

Total addresses includes the network address (all host bits zero) and the broadcast address (all host bits one). Usable hosts excludes those two addresses. For a /24, there are 256 total addresses and 254 usable hosts. For /31 and /32, special rules apply per RFC 3021.

What is a wildcard mask and where is it used?

A wildcard mask is the bitwise inverse of the subnet mask. It is primarily used in Cisco ACL entries and OSPF network statements. For example, the wildcard mask for /24 (255.255.255.0) is 0.0.0.255.

How does the /31 prefix work?

Per RFC 3021, a /31 prefix is used for point-to-point links. Both addresses in the subnet are usable as host addresses, so there are 2 usable hosts and no dedicated broadcast address. This saves address space on router-to-router links.

Technically Reviewed By

Senior Enterprise Network Engineer — 25+ years of IT and network infrastructure experience, including enterprise Cisco switching, routing, wireless, firewalls, VPN, network access control, SD-WAN, and large-scale network operations.

Last reviewed: 2026-09-04

Calculations are performed using standards-based formulas and verified against known reference values. All computation runs client-side in your browser.

Related Resources

CIDR Calculator

Convert CIDR notation to subnet masks, wildcard masks, and calculate usable IP ranges with an interactive slider.

Wildcard Mask Calculator

Convert subnet masks to wildcard masks and inverse masks for ACLs, OSPF, and Cisco access list configuration.

DHCP Scope Calculator

Calculate DHCP scope ranges, available addresses, exclusions, reservations, and utilization for IPv4 networks.

VLAN Sizing Calculator

Determine the right subnet size for a VLAN based on current clients, growth percentage, and reserved infrastructure addresses.

IPv6 Subnet Calculator

Calculate IPv6 subnet ranges, prefix delegation, and subnet IDs for any IPv6 prefix length.

VLSM Calculator & Subnet Planner

Plan VLSM subnets from a parent network. Enter multiple host requirements and automatically allocate non-overlapping, right-sized subnets with largest-first allocation, address-space visualization, CSV export, and print.

Cisco VLAN Config Generator

Generate Cisco IOS-XE VLAN configuration including VLAN ID, name, SVI IP, subnet mask, description, and DHCP relay addresses.

IP Subnet Overlap Checker

Detect overlapping, duplicate, and contained IPv4 subnets. Paste multiple CIDR networks to identify every conflicting pair with clear explanations and CSV export.

Route Summarization Calculator

Calculate the smallest CIDR summary or supernet for multiple IPv4 networks. Warns when the summary includes extra addresses and provides a more precise minimal CIDR set.

Cisco ACL Builder & Analyzer

Build Cisco IOS-XE extended ACLs with wildcard masks and port operators, analyze pasted ACLs for shadowed, redundant, and conflicting rules, and test packets — all in your browser.