Converters
Subnet Calculator
Last updated: June 17, 2026
A subnet calculator is a networking utility that divides an IP address space into logical network segments (subnets). By combining an IPv4 address with a Classless Inter-Domain Routing (CIDR) prefix (ranging from /0 to /32), the calculator determines the subnet mask, network ID, broadcast address, wildcard mask, and the range of usable host IP addresses. It also computes the total number of hosts and the number of usable hosts (subtracting the network and broadcast addresses). Network engineers, systems administrators, and IT students use this tool to design subnetting schemes and troubleshoot routing configurations.
Calculate IP network parameters including subnet mask, network address, broadcast address, wildcard mask, and usable host ranges.
Quick Answer
Calculate IPv4 subnetting details. Enter an IP address and select a CIDR prefix to find the network, broadcast, wildcard mask, and usable host range.
IP Configuration
Enter a dotted-decimal IPv4 address. · e.g. 192.168.1.1
Select the subnet size bits.
Subnet Mask
255.255.255.0
Network: 192.168.1.0 / 24
Standard IPv4 classless subnetting calculations. Total hosts include network and broadcast IPs. Usable hosts subtract network and broadcast IDs (except for /31 or /32 peer-to-peer configurations).
Examples
Local Network Baseline · 192.168.1.1 / 24
Mask: 255.255.255.0 · Usable: 192.168.1.1 – 192.168.1.254 · Hosts: 254
Small Segment · 10.0.0.1 / 30
Mask: 255.255.255.252 · Usable: 10.0.0.1 – 10.0.0.2 · Hosts: 2
Medium Enterprise · 172.16.0.1 / 20
Mask: 255.255.240.0 · Usable: 172.16.0.1 – 172.16.15.254 · Hosts: 4,094
Large Private Scope · 10.0.0.1 / 8
Mask: 255.0.0.0 · Usable: 10.0.0.1 – 10.255.255.254 · Hosts: 16,777,214
How it works
How Subnet Math Works
Subnet calculations are done at the binary level using bitwise operations:
A 32-bit mask is created with the number of 1s equal to the CIDR prefix, padded by 0s:
/24 = 11111111.11111111.11111111.00000000 = 255.255.255.0
Calculated by performing a bitwise AND operation between the IP address and the subnet mask:
Network ID = IP AND Subnet Mask
Calculated by taking the bitwise NOT of the subnet mask:
Wildcard Mask = NOT Subnet Mask
Calculated by performing a bitwise OR operation between the Network ID and the Wildcard Mask:
Broadcast = Network ID OR Wildcard Mask
Total IP addresses is 2 raised to the power of the host bits (32 − prefix):
Total Hosts = 2^(32 − prefix)
Usable Hosts = Total Hosts − 2
Subnet Classes Reference Table
| Class | IP Range | Default Prefix | Purpose |
|---|---|---|---|
| Class A | 1.0.0.0 – 126.0.0.0 | /8 | Very large networks |
| Class B | 128.0.0.0 – 191.255.0.0 | /16 | Medium to large networks |
| Class C | 192.0.0.0 – 223.255.255.0 | /24 | Small local networks |
| Class D | 224.0.0.0 – 239.255.255.255 | N/A | Multicasting (not subnetted) |
Note: Classless Inter-Domain Routing (CIDR) has largely replaced classful network boundaries. Today, CIDR allows routing tables to aggregate addresses flexibly regardless of the historical class boundaries.
Related Calculators
More tools from Converters
Frequently asked questions
Subnetting is the practice of dividing a single large network into smaller, logical sub-networks (subnets). This improves network routing efficiency, security, and IP address management.
CIDR (Classless Inter-Domain Routing) prefix (like /24) represents the number of consecutive binary 1s in the subnet mask. For example, a /24 prefix has 24 bits set to 1, which corresponds to a decimal subnet mask of 255.255.255.0.
In standard subnets, two IP addresses are reserved for network administrative purposes: the first address (network ID) represents the subnet itself, and the last address (broadcast address) is used to send packets to all hosts on the subnet.
A wildcard mask is the bitwise inverse of the subnet mask. It is calculated by subtracting each octet of the subnet mask from 255. In Cisco router configurations, wildcard masks are used in access control lists (ACLs) to define IP matching rules.
Private IPs are reserved for internal networks and are not routable on the public internet. The standard ranges defined by RFC 1918 are: 10.0.0.0 – 10.255.255.255, 172.16.0.0 – 172.31.255.255, and 192.168.0.0 – 192.168.255.255.
Related calculators
Converters
Length Converter
Convert between millimeters, centimeters, meters, kilometers, inches, feet, yards, miles, and nautical miles.
Converters
Weight Converter
Convert weight and mass units: milligram, gram, kilogram, metric tonne, ounce, pound, stone, US ton, and imperial ton.
Converters
Temperature Converter
Convert between Fahrenheit, Celsius, Kelvin, and Rankine using exact formulas. Flags impossible values below absolute zero.