Subnet Calculator

Enter an IP address and CIDR prefix to calculate network details — subnet mask, broadcast address, host range, and more. Pure client-side computation.

Subnet Details
Network Address
192.168.1.0
Broadcast Address
192.168.1.255
Subnet Mask
255.255.255.0
Wildcard Mask
0.0.0.255
Total Addresses
256
Usable Hosts
254
First Usable IP
192.168.1.1
Last Usable IP
192.168.1.254
IP Class
C
Binary Subnet Mask
11111111.11111111.11111111.00000000
Common CIDR Quick Reference
CIDRSubnet MaskUsable Hosts
/8255.0.0.016,777,214
/16255.255.0.065,534
/24255.255.255.0254
/25255.255.255.128126
/26255.255.255.19262
/27255.255.255.22430
/28255.255.255.24014
/29255.255.255.2486
/30255.255.255.2522
/32255.255.255.2551

Understanding Subnetting

Subnetting is the practice of dividing a network into two or more smaller networks called subnets. Every IP address has two components: a network portion that identifies which network the device belongs to, and a host portion that identifies the specific device within that network.

The subnet mask determines where this division occurs. A subnet mask of 255.255.255.0 (or /24 in CIDR notation) means the first 24 bits identify the network and the remaining 8 bits identify hosts. By adjusting the subnet mask, network administrators can create subnets of varying sizes to match their requirements.

CIDR Notation Explained

CIDR (Classless Inter-Domain Routing) replaced the rigid classful addressing system in 1993. Instead of fixed Class A, B, and C boundaries, CIDR allows networks to be divided at any bit boundary. The notation 10.0.0.0/8 means the first 8 bits are the network prefix, giving 16.7 million host addresses.

CIDR is essential for modern internet routing because it allows route aggregation (supernetting), reducing the size of routing tables. It also enables efficient allocation of IP address space — an organization needing 500 addresses can receive a /23 (512 addresses) instead of wasting an entire Class B (/16 with 65,534 addresses).

Subnet Masks in Practice

Subnet masks are fundamental to how routers forward packets. When a device wants to communicate with another IP address, it performs a bitwise AND of the destination IP with its own subnet mask. If the result matches its own network address, the destination is local; otherwise, the packet is sent to the default gateway.

Common subnet masks include /24 (255.255.255.0) for small networks, /16 (255.255.0.0) for medium networks, and /8 (255.0.0.0) for large networks. In data centers and cloud environments, smaller subnets like /28 or /29 are common for isolating services and minimizing attack surface.

Network Planning and IP Addressing

Proper network planning starts with understanding how many hosts each subnet needs. A good practice is to plan for growth — if a department has 20 devices, a /27 (30 usable hosts) allows room to expand, while a /28 (14 hosts) would be too small. Network engineers often use Variable Length Subnet Masking (VLSM) to assign different prefix lengths to different subnets within the same address space.

Private IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) defined in RFC 1918 are used for internal networks behind NAT. Understanding how to efficiently subdivide these ranges is a core networking skill used in everything from home lab setups to enterprise campus designs.

Frequently Asked Questions

Related Tools

Explore More Tools

Find this tool useful? Buy us a coffee to keep DuskTools free and ad-light.