IP Subnet Calculator
Enter an IPv4 address and subnet prefix to get the network range, host capacity, masks, reverse-DNS name, and useful binary and IPv6 transition representations.
Network details
Live results
Subnet and address details
| Property | Value |
|---|---|
| IP address | 192.168.86.42 |
| IP class | Class C |
| Subnet mask | 255.255.255.0 |
| Wildcard mask | 0.0.0.255 |
| CIDR notation | 192.168.86.42 /24 |
| IP address – integer | 3232257578 |
| IP address – hexadecimal | 0xc0a8562a |
| IP address – binary | 11000000.10101000.01010110.00101010 |
| Subnet mask – binary | 11111111.11111111.11111111.00000000 |
| in-addr.arpa | 42.86.168.192.in-addr.arpa |
| IPv4-mapped IPv6 | ::ffff:c0a8:562a |
| 6to4 prefix | 2002:c0a8:562a::/48 |
How to use this IP subnet calculator
What this calculator does
This calculator turns one IPv4 address plus a CIDR subnet prefix into a compact network map. It identifies the subnet's network and broadcast addresses, the conventional usable-host range, the decimal subnet and wildcard masks, the historical IP class, private/public classification, and several equivalent address representations. It is useful for planning small LANs, checking router or firewall rules, verifying that two addresses fall into the expected block, and practicing IPv4 subnetting. It does not test connectivity, discover live devices, validate routing policy, or decide whether an address is actually reachable on the public Internet. CIDR itself is a classless addressing system; the displayed IP class is included only as a historical classification. The IETF's CIDR address and prefix notation guidance in RFC 4632 explains why a slash value from 0 through 32 represents the number of significant network bits.
When to use it
- Before assigning static addresses, confirm the network boundary and conventional first/last host addresses for a proposed IPv4 subnet.
- While troubleshooting, compare an interface's IP and prefix with the subnet you expected it to occupy.
- When writing ACLs or wildcard-mask rules, convert a CIDR prefix into both the subnet mask and its inverted wildcard mask.
- When studying networking fundamentals, compare decimal, binary, hexadecimal, reverse-DNS, and IPv6 transition forms of the same address.
How to calculate
- The calculator opens with a complete demonstration: Class C filter, subnet mask /24, and IP address 192.168.86.42. The results and example XLSX workbook are ready immediately.
- Choose Network class if you want to limit the subnet-mask menu to class-era starting points. Select Any CIDR prefix to expose the full /1 – /32 range.
- Choose the Subnet mask in CIDR form. The dotted-decimal mask appears beside each prefix in the menu.
- Replace Octet 1, Octet 2, Octet 3, and Octet 4 with the IPv4 address you want to analyze. Results update live after every valid edit.
- Read the network summary first, then use the detail table for masks, binary values, integer/hex forms, reverse-DNS name, and IPv6 transition representations. Select Download Excel to export the current canonical values. Reset clears the demonstration data and may disable export until all four octets are valid again.
Input guide
Output guide
Network address is the first address in the block and is calculated by bitwise-ANDing the IP address with the subnet mask. Broadcast address is the final address in the conventional subnet range. First host address and Last host address bracket the conventional assignable host range when at least two host addresses remain. Total addresses is the exact identity 2^(32 – prefix), while Usable hosts is shown here as total addresses minus two, floored at zero to match the conventional subnet-table behavior. RFC 1878 provides an IPv4 variable-length subnet table with prefix and address-count relationships.
IP type is Private only for the three address blocks reserved by RFC 1918 private addressing; other values are labeled Public in this calculator's two-way classification. IP class reports the historical Class A – E category from the first octet and should not be confused with the Network class filter. Subnet mask and Wildcard mask are bitwise complements. CIDR notation joins the entered address and prefix. IP address – integer, IP address – hexadecimal, and IP address – binary are exact alternate representations of the same 32-bit value. Subnet mask – binary exposes the contiguous network-one bits. in-addr.arpa reverses the four octets for IPv4 reverse-DNS naming. IPv4-mapped IPv6 embeds the IPv4 bits after the ::ffff: prefix, while 6to4 prefix places them after 2002: to form the historical 6to4 /48 prefix.
Worked example
With 192.168.86.42 and /24, the mask is 255.255.255.0. In binary, the first 24 mask bits are 1 and the final 8 are 0. ANDing the IP with that mask preserves 192.168.86 and clears the host octet, giving the first-open Network address 192.168.86.0. A /24 leaves 8 host bits, so the block contains 2^8 = 256 total addresses. The final address is therefore 192.168.86.255; under the traditional convention, excluding network and broadcast gives 254 usable hosts, from 192.168.86.1 through 192.168.86.254. Because 192.168.86.42 falls within 192.168.0.0/16, its IP type is Private. The same address is 3232257578 as an unsigned integer and 0xc0a8562a in hexadecimal.
Learn more
For ordinary multi-access IPv4 subnets, reserving network and broadcast addresses is the familiar convention used above. On point-to-point links, however, RFC 3021 defines special use of /31 prefixes in which both addresses can act as host addresses and no directed broadcast address is needed. This calculator intentionally keeps the conventional zero-usable-host /31 result so its host count remains consistent with the reference subnet-table model; treat the RFC 3021 exception as a deployment-specific rule.
How the subnet math works
IPv4 addresses contain 32 bits. A CIDR prefix says how many leading bits belong to the network prefix; the remaining bits identify positions inside that block. The subnet mask is simply the prefix written as 1 bits followed by 0 bits. The network address is network = IP AND subnet mask and the wildcard mask is the inverse of the subnet mask. The broadcast address is the network address with every host bit set to 1. These operations are exact bit identities, not estimates.
The address-count relationship is equally direct: total addresses = 2^(32 – prefix) Moving from /24 to /25 halves the block from 256 addresses to 128; moving to /26 halves it again to 64. That power-of-two behavior is why subnet boundaries occur at regular binary intervals rather than arbitrary decimal cutoffs.