How To Use Subnet Calculator
To use subnet calculator input IP address in dotted-decimal format (e.g. 10.0.0.1). Classful subnet calculator is based on classful network addressing architecture. Classful networking was used until the introduction of CIDR (classless inter domain routing). Calculations are given instantly when typing. Invalid input gives no results. Calculator will assume that unfinished IP addresses end with zeros. Network class of the subnet calculator IP address will be determined automatically. Only Network classes A,B and C will calculate results. For classes network calculations, please use CIDR calculator, for route aggregation, please use Supernet calculator.
|Class||First octet range||Leading bits||Number of subnets||Number of hosts|
|Class A||1-126||0||128 (27)||16777216 (224)|
|Class B||128-191||10||16384 (214)||65536 (216)|
|Class C||192-223||110||2097152 (221)||256 (28)|
Select subnet mask in dotted-decimal format or by adjusting subnet bits or max subnets.
Subnet Calculator feature list:
- Subnet calculator provides calculations using IP address and subnet mask (subnet bits, max subnets, host bits, max hosts);
- Subnet ID, broadcast, host addresses, wildcard mask and class bit usage bitmap are provided as calculation results;
- Optional RFC 3021 support.
Internet Protocol Address (or IP) are used by network devices as host identifiers for communication with other network devices using Internet Protocol. Internet Protocol version 4 (IPv4) are 32-bit binary numbers, usually represented in human-readable dotted-decimal format (e.g. 220.127.116.11). Certain IP addresses are reserved by the Internet Assigned Numbers Authority (IANA) for special use and cannot be used as host addresses (listed in RFC 5735). To convert IP address value between binary, decimal and hex, please use IP conversion.
Subnet mask is binary number (also usually represented in dotted-decimal format) used to separate network and host parts in IP address. IPv4 subnet mask is 32 bits large. In a valid subnet mask network part is represented with "1" from left side followed and ended by host part "0" - 11111111.11111111.11111111.00000000 (binary form), 255.255.255.0 (dotted-decimal form) or simply "/24" (where 24 represents that subnet network part is 24 bits long). Subnet calculator allows calculation for 255.255.255.254.
Subnet and Host Bits
Subnet bits are the number of bits used to identify subnet. IP network is divided into network prefix and host identifier. Host bits are there to identify hosts and it is divided into subnet and host identifier.
Max Subnets and Hosts
Maximum number of subnets and hosts available in the specified subnet mask.
- Max subnets = 2subnet_bits
- Max hosts = 2host_bits - 2 (subtraction of network and broadcast addresses. Exceptions are subnets with /31 subnet mask where there is no subtraction part)
Reserved subnet address that represents the network. It is destination part of the IP routes and it cannot be assigned to host as an identifier. Subnet ID is calculated by using bitwise AND between IP address and subnet mask.
11000000.10101000.01011000.00000001 (192.168.88.1) AND 11111111.11111111.00000000.00000000 (255.255.0.0 or /16) = 11000000.10101000.00000000.00000000 (192.168.0.0)
Reserved address that is used to target all devices in given network. It cannot be assigned to the host. Subnet broadcast is calculated by performing bitwise NOT on subnet mask:
NOT 11111111.11111111.00000000.00000000 (255.255.0.0 or /16) = 00000000.00000000.11111111.11111111then using bitwise OR between inverted subnet mask and IP address:
11000000.10101000.01011000.00000001 (192.168.88.1) OR 00000000.00000000.11111111.11111111 (~255.255.0.0) = 11000000.10101000.11111111.11111111 (192.168.255.255)
Subnet calculator address range calculation: network ID + 1 to broadcast - 1
Wildcard mask is inverted subnet mask. Wildcard mask is calculated by inverting the subnet mask:
NOT 11111111.11111111.00000000.00000000 (255.255.0.0) = 00000000.00000000.11111111.11111111 (0.0.255.255)
Class Bit Usage
Subnet calculator visually shows network prefix, subnet and host bits structure in the given IP address. "n" stands for network part of the network, "s" - subnet part and "h" - host part.
Whether to use /31 or 255.255.255.254 subnet mask specified in RFC 3021