IP Subnet Calculator
Calculate network address, broadcast address, usable host range, and total hosts for any IPv4 subnet. Includes binary representation and IP class detection.
IP Subnet
Results update instantly as you type
Enter Values
Embed Code
Copy and paste this HTML snippet into any web page to embed this calculator directly.
<iframe src="http://127.0.0.1:54963/embed/engineering/ip-subnet-calculator?ref=embed" title="IP Subnet Calculator" width="100%" style="max-width:600px; border:none; height:500px;" loading="lazy"></iframe>
Direct Link
Share this link to let others open the calculator in their browser.
The Formula
IP subnetting divides an IP address into network and host portions using a subnet mask. The network address (all host bits = 0) is the first address in the range and identifies the subnet. The broadcast address (all host bits = 1) is the last address, used to send packets to all hosts on that subnet simultaneously. The addresses in between are available for assigning to individual devices (hosts). The subnet mask is applied to the IP address using a bitwise AND operation to extract the network portion.
Variable Definitions
IP Address & Subnet Mask
IP address identifies a specific network interface (e.g., 192.168.1.1). The subnet mask separates the network and host portions: 1-bits represent the network, 0-bits the host. Written as dotted decimal (255.255.255.0) or CIDR (/24).
CIDR Prefix
The number of leading 1-bits in the subnet mask. Common values: /24 (255.255.255.0, 256 addresses), /16 (255.255.0.0, 65536 addresses), /8 (255.0.0.0, 16.7M addresses).
Usable Hosts
The number of available host addresses, calculated as 2^(32 - CIDR) - 2. We subtract 2 because the first address is reserved for the network ID and the last for the broadcast. A /24 network has 254 usable hosts.
How to Use This Calculator
- 1
Enter an IPv4 address in dotted decimal format (e.g., 192.168.1.0).
- 2
Enter the CIDR prefix as a number from 0 to 32 (e.g., 24 for a /24 network).
- 3
View the complete subnet breakdown including network address, subnet mask in both formats, usable host range, broadcast address, and total hosts.
A /24 subnet has 254 usable host addresses
Understanding the Concept
Subnetting is fundamental to network engineering and CCNA certification. It allows network administrators to divide a large network into smaller, more manageable subnetworks, improving security, reducing broadcast traffic, and conserving IP address space. Understanding the binary representation is key: the subnet mask has consecutive 1-bits for the network portion and 0-bits for the host portion. For example, 255.255.255.0 in binary is 24 ones followed by 8 zeros — the first 24 bits identify the network, and the last 8 bits identify individual hosts on that network. This binary operation is why bitwise AND with the mask extracts the network address, and bitwise OR with the inverted mask produces the broadcast address. The practice of subnetting is essential for efficient IP address management in both enterprise networks and cloud infrastructure (AWS VPCs, Azure virtual networks).
Frequently Asked Questions
Sources & References
Related Calculators
Reviews
No reviews yet. Be the first to share your experience with IP Subnet Calculator.
Write a Review
