🔢 Other

IP subnet calculator Dekho

IPv4 Subnet Calculator
Network Class
Subnet
IP Address
Dot-decimal IPv4 address
Network Address
Broadcast Address
Usable Host Range
Subnet Mask
Total Hosts
Usable Hosts
Wildcard Mask
CIDR
IPv6 Subnet Calculator
Prefix Length
IP Address
Network
First Host
Last Host
Total Addresses
CIDR

Formulas & Explanation

IPv4
Convert IPv4 to a 32-bit integer. For prefix length n, subnet mask is: mask = ((2^n − 1) << (32 − n)). Network = IP & mask. Broadcast = Network | (~mask). Usable range: [Network+1 .. Broadcast−1] when n ≤ 30; otherwise no usable host. Total hosts = 2^(32 − n). Usable hosts = max(0, Total − 2) when n ≤ 30.
// Example (192.168.1.10/24) mask = 255.255.255.0 network = 192.168.1.0 broadcast = 192.168.1.255 usable = 192.168.1.1 — 192.168.1.254 hosts_total = 256, hosts_usable = 254
IPv6
IPv6 has 128 bits. Network = IP & mask where first n bits of the mask are 1. Total addresses = 2^(128 − n). There is no broadcast in IPv6; first/last usage depends on policy, so we display [network .. last].