Subnet Calculator
Calculate IPv4 network address, broadcast IP, usable host range, CIDR notation, and subnet masks.
Parameters & Inputs
Summary & Breakdown
Network Attributes
About the Subnet Calculator
Subnetting is the practice of dividing a single large IP network into smaller, logically partitioned sub-networks to improve routing efficiency, conserve address space, and isolate network security perimeters.
Under Classless Inter-Domain Routing (CIDR), network masks are defined by prefix bit lengths such as /24 or /28 rather than obsolete legacy Class A, B, and C boundaries.
This IPv4 subnet calculator delivers immediate network parameters including Network ID, Broadcast Address, First and Last usable host endpoints, and wildcard masks.
How the Calculations Work
Converts the four decimal octets into a 32-bit integer, creates a 32-bit bitmask with N leading ones, applies bitwise AND to determine network ID, and applies bitwise OR with inverted mask to find the broadcast IP.
Network ID = IP AND Mask | Broadcast = IP OR (NOT Mask) | Usable Hosts = 2^(32 - CIDR) - 2
Variables & Definitions
- CIDR: Count of leading network bits in the 32-bit address mask
- Host Bits: 32 minus CIDR prefix length
- -2 Rule: Subtracts reserved Network Address and Broadcast Address
Given 192.168.1.100 on /24: Mask is 255.255.255.0. Bitwise AND gives network ID 192.168.1.0. Broadcast is 192.168.1.255. Usable range is 192.168.1.1 through 192.168.1.254 (254 hosts).
Key Terms Explained
CIDR Notation
Classless Inter-Domain Routing syntax appending a slash and prefix length (e.g., /24) to denote network mask bits.
RFC 1918 Private Addresses
Unrouted local LAN blocks: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.
Broadcast Address
The highest address in a subnet used to send packets simultaneously to all endpoints on that segment.
Wildcard Mask
The inverted subnet mask (255.255.255.255 minus subnet mask) used in Cisco ACLs and OSPF routing configurations.
Practical Tips & Pitfalls to Avoid
Point-to-point router links use /30 or /31
/30 subnets provide exactly 2 usable host IPs, perfect for connecting two router interfaces.
Reserve default gateway
Network engineers conventionally assign either the first usable IP (.1) or last usable IP (.254) to the default gateway.
Check private vs public address space
IPs starting with 192.168.x.x, 10.x.x.x, or 172.16-31.x.x are non-routable private addresses.
Remember power-of-two host capacity
Each additional CIDR bit halves the available host addresses (e.g., /24 = 254 hosts, /25 = 126 hosts).
Frequently Asked Questions
The lowest address (all host bits 0) represents the network identity, and the highest address (all host bits 1) is reserved for broadcast messaging.
Almost all residential home routers use a /24 subnet (255.255.255.0), providing 254 assignable DHCP addresses.
A wildcard mask is the exact inverse of a subnet mask (0.0.0.255 for /24), indicating which bit positions routers must inspect in Access Control Lists (ACLs).
32 - 28 = 4 host bits. 2^4 = 16 total IP addresses, yielding 16 - 2 = 14 usable host IPs.
This calculator is dedicated to IPv4 32-bit addressing. IPv6 uses 128-bit hexadecimal addressing.