Subnet Calculator
Calculate IPv4 subnet information including network address, broadcast address, host ranges, and CIDR notation for network planning and troubleshooting.
Understanding IPv4 Subnetting
Subnetting is the practice of dividing a network into smaller, more manageable subnetworks. This subnet calculator helps you determine network addresses, host ranges, and other critical information for proper network design and IP address management.
What is CIDR Notation?
CIDR (Classless Inter-Domain Routing) notation is a compact representation of an IP address and its associated network mask. It's written as an IP address followed by a slash and a number representing the number of network bits.
| CIDR | Subnet Mask | Usable Hosts | Network Size |
|---|---|---|---|
| /30 | 255.255.255.252 | 2 | Point-to-point links |
| /29 | 255.255.255.248 | 6 | Very small networks |
| /28 | 255.255.255.240 | 14 | Small workgroups |
| /27 | 255.255.255.224 | 30 | Small departments |
| /26 | 255.255.255.192 | 62 | Medium departments |
| /25 | 255.255.255.128 | 126 | Large departments |
| /24 | 255.255.255.0 | 254 | Standard LAN (most common) |
| /23 | 255.255.254.0 | 510 | Large LANs |
| /22 | 255.255.252.0 | 1,022 | Very large LANs |
How Subnet Masking Works
A subnet mask determines which portion of an IP address represents the network and which represents the host. The mask uses binary:
- 1 bits: Network portion (cannot be changed for hosts)
- 0 bits: Host portion (available for device assignment)
Key Subnet Components
Network Address
The network address identifies the subnet itself. It's calculated by performing a logical AND operation between the IP address and subnet mask. This address cannot be assigned to any device.
Broadcast Address
The broadcast address is used to send data to all hosts in the subnet. It's the last address in the range where all host bits are set to 1. Like the network address, it cannot be assigned to devices.
Host Range
The host range includes all addresses between the network and broadcast addresses. These are the addresses you can assign to devices like computers, servers, routers, and other network equipment.
Wildcard Mask
A wildcard mask is the inverse of a subnet mask. It's used in access control lists (ACLs) and some routing protocols. Where the subnet mask has 0s, the wildcard mask has 1s, and vice versa.
Private vs Public Networks
The calculator identifies whether an IP address belongs to a private network:
Private IP Ranges (RFC 1918)
- Class A: 10.0.0.0/8 (10.0.0.0 - 10.255.255.255)
- Class B: 172.16.0.0/12 (172.16.0.0 - 172.31.255.255)
- Class C: 192.168.0.0/16 (192.168.0.0 - 192.168.255.255)
Private addresses are not routed on the public internet and are commonly used for internal networks behind NAT (Network Address Translation).
Subnetting Best Practices
- Plan for growth: Choose subnet sizes 20-30% larger than current needs
- Use consistent schemes: Implement logical, documented addressing plans
- Align with VLANs: Match subnet boundaries with VLAN boundaries
- Consider security: Use subnets to create security boundaries
- Document everything: Maintain accurate network documentation
- Avoid waste: Use Variable Length Subnet Masking (VLSM) for efficiency
Common Subnetting Scenarios
Small Office/Home Office (SOHO)
Typically use /24 (255.255.255.0) providing 254 hosts. Example: 192.168.1.0/24 for a small business network with room for computers, printers, and IoT devices.
Point-to-Point Links
Use /30 (255.255.255.252) providing only 2 usable addresses. Perfect for router-to-router connections where only two devices need IP addresses.
Server Networks
Often use /27 or /28 subnets to provide sufficient addresses for servers while limiting the broadcast domain for better performance and security.
Troubleshooting with Subnets
Understanding subnetting helps diagnose network issues:
- Communication failures: Check if devices are in the same subnet
- IP conflicts: Verify addresses are within the correct host range
- Routing problems: Ensure routers have correct subnet information
- DHCP issues: Confirm DHCP scope matches subnet configuration
I nostri esperti hanno selezionato
Prodotti Consigliati
Aggiornato Febbraio 2026 · Testati e verificati
CCNA 200-301 Official Cert Guide Library
💡 Perché lo consigliamo
Complete networking certification guide covering subnetting and CIDR
TP-Link AC1750 Smart WiFi Router
Dual-band router with advanced subnet and VLAN configuration options
🔗 Link affiliato Amazon — supporti CalcFast senza costi aggiuntivi
🔗 Link affiliato Amazon — supporti CalcFast senza costi aggiuntivi
Frequently Asked Questions
What is a subnet and why is it important?
A subnet divides a larger network into smaller segments. Subnetting improves performance, security, and organization by reducing broadcast traffic and enabling better access control.
What does CIDR notation mean?
CIDR uses a slash and number (e.g., /24) to indicate network bits. /24 means 24 bits for network, leaving 8 bits for hosts (254 usable addresses).
How do I calculate hosts in a subnet?
Usable hosts = 2^(32-CIDR) - 2. For /24: 2^8 - 2 = 254 hosts. We subtract 2 for network and broadcast addresses.
What are network and broadcast addresses?
Network address identifies the subnet (all host bits 0). Broadcast address sends to all hosts (all host bits 1). Neither can be assigned to devices.
What are private IP ranges?
Private IPs not routed on internet: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. Used for internal networks behind NAT.
How does subnet masking work?
Subnet masks use binary 1s for network bits, 0s for host bits. AND operation with IP reveals network portion, masks host portion.
What is a wildcard mask?
Wildcard mask is inverse of subnet mask, used in ACLs and routing protocols. Where subnet has 1s, wildcard has 0s, and vice versa.
Can I subnet a subnet (VLSM)?
Yes, Variable Length Subnet Masking allows different sized subnets from larger subnet, maximizing IP efficiency in complex networks.
What are standard subnet sizes?
Common: /30 (2 hosts), /29 (6), /28 (14), /27 (30), /26 (62), /25 (126), /24 (254), /23 (510), /22 (1022) hosts.
How do I choose subnet size?
Count required hosts, add 20-30% growth, choose smallest size that fits. Consider topology and administrative boundaries.
What if I use wrong subnet mask?
Wrong masks cause connectivity issues, routing failures, and performance problems. Devices may not communicate properly. Always verify calculations.
How does subnetting improve security?
Creates network boundaries secured with firewalls and ACLs. Limits broadcast domains and enables segmentation for better access control.