What is Subnet Calculator?
Computes IPv4 network boundaries, wildcard masks, usable host ranges, and broadcast IPs for network subnetting.
How to Use This Calculator
- Enter an IPv4 address.
- Select CIDR prefix length.
- View network ID, broadcast IP, and usable hosts.
The Mathematical Formula & Variables
Usable Hosts = 2^(32 - CIDR) - 2; Network ID = IP bitwise AND Netmask
Step-by-Step Worked Example
Scenario: Subnetting 192.168.1.100 with a /24 CIDR prefix.
- Host bits = 32 - 24 = 8 bits.
- Total addresses = 2^8 = 256.
- Usable hosts = 256 - 2 = 254 hosts (192.168.1.1 to 192.168.1.254).
Result: 254 Usable Hosts (/24)
Frequently Asked Questions
Why do we subtract 2 from total addresses?
The first address is reserved as the Network ID, and the last address is reserved as the Subnet Broadcast address.