🌐 EN

🌐 IP Subnet Calculator

Quickly calculate network information from IP address and CIDR

Calculation Results
Subnet Mask
Network Address
First Host
Last Host
Broadcast Address
Usable Hosts

Common CIDR Values

/8 · 16,777,214 hosts (255.0.0.0) /16 · 65,534 hosts (255.255.0.0) /24 · 254 hosts (255.255.255.0) /28 · 14 hosts (255.255.255.240) /30 · 2 hosts (255.255.255.252) /32 · 1 host (255.255.255.255)
GUIDE

Learn more

01

1. Understanding Subnets and CIDR Notation

Subnetting is a technique to divide IP networks into smaller logical units. CIDR (Classless Inter-Domain Routing) notation displays IP addresses followed by a slash (/) and the number of network bits. For example, 192.168.1.0/24 means the first 24 bits are the network portion. Subnet masks distinguish network and host portions, with /24 equivalent to 255.255.255.0. Classful addressing (A, B, C) was inefficient and replaced by CIDR. /32 represents a single host, /31 provides 2 addresses for point-to-point links. Subnetting enables efficient network management and enhanced security.

02

2. Network and Broadcast Addresses

Network address is the first address in a subnet with all host bits set to 0. The network address of 192.168.1.0/24 is 192.168.1.0. Broadcast address is the last address with all host bits set to 1, becoming 192.168.1.255. Network and broadcast addresses cannot be assigned to hosts. Usable host addresses equal total addresses minus 2. /24 provides 254 usable addresses from 256 total. /30 offers only 2 usable addresses from 4, suitable for point-to-point links. IPv6 uses multicast instead of broadcast.

03

3. Subnet Mask Calculation and Conversion

Subnet masks consist of consecutive 1s and 0s in binary. /24 is 11111111.11111111.11111111.00000000 or 255.255.255.0. /28 has 28 bits of 1s, resulting in 255.255.255.240. To convert CIDR to subnet mask, add (32 - CIDR) bits of 0s. Conversely, counting 1 bits in the subnet mask gives the CIDR value. VLSM (Variable Length Subnet Mask) allows subnets of varying sizes. Wildcard masks are inverted subnet masks used in ACL configurations. Supernetting combines multiple networks into one.

04

4. Practical Subnetting Examples and Planning

Let's examine dividing a corporate network by department. A company has 10.0.0.0/8 network. Sales team needing 500 people fits /23 (510 hosts). Development team of 100 suits /25 (126 hosts). Small branches use /28 (14 hosts). Server-to-server connections employ /30 (2 hosts). Subnet planning should consider future growth and reserve extra addresses. Hierarchical addressing simplifies routing tables. Grouping address blocks by region and function eases management. Documentation tracks IP address allocation status.

05

5. Relationship Between Routing and Subnets

Routers forward packets between different subnets. Hosts within the same subnet communicate directly, while different subnets require routers. Routing tables contain destination networks and next-hop information. Longest prefix matching selects the most specific route. CIDR aggregation summarizes multiple subnets into one route. 10.1.0.0/24, 10.1.1.0/24, 10.1.2.0/24 can aggregate to 10.1.0.0/22. Default route (0.0.0.0/0) handles all unknown destinations. Inter-subnet communication is controlled by firewalls to enhance security.

06

6. Using Subnet Calculators and Tips

IP subnet calculators are essential for network design and troubleshooting. Entering IP and CIDR instantly calculates network address, broadcast, and usable hosts. Appropriate CIDR can be reverse-calculated from required host count. Needing 100 hosts means 2^7=128, so /25 is suitable. Subnet division follows powers of 2. Dividing /24 into 4 parts yields /26. Avoid overlaps to prevent IP conflicts. Use private IP ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) for internal networks. Online tools verify and visualize complex VLSM plans.

Frequently asked questions

Is the IP address I enter sent to a server?
No. All calculation happens client-side in JavaScript, and the IP address you enter is never sent to or stored on a server.
How do I pick the right CIDR value for the number of hosts I need?
Find the smallest power of 2 that's greater than your required host count. For example, 100 hosts needs 2^7=128, so use /25 (126 usable hosts). It's good practice to size up slightly for future growth.
Why can't the network and broadcast addresses be assigned to a host?
The network address (all host bits 0) is reserved to identify the subnet itself, and the broadcast address (all host bits 1) is reserved for sending to every device on the subnet at once — neither can be given to an individual device.
When would I use a tiny subnet like /30 or /31?
/30 suits point-to-point links where only two devices need to connect, like router-to-router. /31, per RFC 3021, is dedicated to point-to-point links and uses both addresses as hosts with no network or broadcast address.
Does this calculator treat private and public IP ranges differently?
The math is identical either way. However, 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 are reserved for private use, so internal network designs typically subnet within those ranges.