Tech & Web
IP Address & Subnet Calculator
Calculate subnets, usable host ranges, wildcard masks, and binary representations for IPv4 addresses.
Inputs
Results
Network Address / CIDR
192.168.1.0/24
Usable Host Range
192.168.1.1 - 192.168.1.254
Broadcast Address
192.168.1.255
Total Usable Hosts
254
Subnet Mask
255.255.255.0
Wildcard Mask
0.0.0.255
IP Binary Representation
11000000.10101000.00000001.00000001
Subnet Mask Binary
11111111.11111111.11111111.00000000
How It Works
Subnetting splits a single IPv4 network into smaller, logical sub-networks. It operates by applying a bitwise AND operation between the IP address and the Subnet Mask. The host bits are determined by the CIDR prefix length (e.g. /24 has 24 network bits and 8 host bits), leaving $2^{32-\\text{CIDR}} - 2$ usable addresses after subtracting the network and broadcast boundaries.
Formula Used
Network Address = IP & Subnet Mask
Calculates the base network identifier by performing a bitwise AND between the IP address and the subnet mask.
Usable Hosts = 2^(32 - CIDR) - 2
Computes the number of assignable IP addresses on the network, subtracting the network identifier and the broadcast address (valid for subnets /30 and larger).
Worked Example
Here is a step-by-step example of how these values are calculated:
IP Address
192.168.1.1
CIDR
/24
Result: Network: 192.168.1.0/24, Usable Hosts: 192.168.1.1 - 192.168.1.254 (254 hosts), Broadcast: 192.168.1.255.
Frequently Asked Questions
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation represents a subnet mask by counting the number of leading 1-bits in the mask. For example, /24 represents 24 leading 1-bits (255.255.255.0).
Why are there two fewer usable hosts than the total block size?
In any standard subnet (except /31 and /32), the first address is reserved as the Network Address (identifying the subnet itself) and the last address is reserved as the Broadcast Address (used to send packets to all hosts on the subnet).