UTILITY GUIDE

Subnet Calculator: Guide to IP Subnet Calculation

How subnetting works, CIDR notation, network range calculation and available hosts to plan your networks.

Subnetting: divide to manage better

Subnetting is the practice of dividing an IP network into smaller subnetworks. It's like dividing a large open space into separate offices: each office has its own defined area, its occupants, and communication between offices goes through controlled doors (routers). The reasons for subnetting are many: improving security by isolating network segments (the office network separated from the server network), reducing broadcast traffic by confining it to the subnet, optimizing IP address usage, and simplifying network management.

The Subnet Calculator automates the calculations that network engineers must do daily: given an IP address and a subnet mask (or CIDR notation), it instantly calculates the network address, broadcast address, assignable host IP range, number of available hosts, and wildcard mask used in ACLs. These calculations, done by hand, require laborious binary conversions and are error-prone — the tool makes them instant and reliable.

CIDR notation and subnet mask

Common CIDR table
$ subnet-calc --cidr 192.168.1.0/24

Network:    192.168.1.0/24
Netmask:    255.255.255.0
Wildcard:   0.0.0.255
Broadcast:  192.168.1.255
HostMin:    192.168.1.1
HostMax:    192.168.1.254
Hosts:      254

# Riferimento rapido CIDR:
# /30 = 4 IP (2 host)   → Link point-to-point
# /28 = 16 IP (14 host) → Piccola DMZ
# /24 = 256 IP (254 host) → LAN standard
# /16 = 65536 IP          → Rete grande
# /8  = 16M IP            → Classe A

CIDR (Classless Inter-Domain Routing) notation expresses the subnet in IP/prefix format, where the prefix indicates how many bits identify the network. /24 means the first 24 bits are the network part and the last 8 are the host part (2^8 = 256 addresses, of which 254 are usable). The equivalent subnet mask for /24 is 255.255.255.0. Our Subnet Calculator automatically converts between CIDR and subnet mask and calculates all derived parameters.

Practical subnet planning

To plan your network subnets, start from the number of hosts needed per segment and use the smallest CIDR that contains them. Practical example: if you need 50 hosts, /26 offers 62 hosts — sufficient with growth margin. /27 offers only 30 hosts — insufficient. Always plan a 30-50% margin for future growth. Common mistake: choosing a subnet that is too small, requiring restructuring when devices are added.

To verify the network configuration of your devices, combine the Subnet Calculator with Ping to test reachability within the subnet and Traceroute to verify that routing between subnets works correctly. If you are configuring a server with a static IP, use IP Geolocation to verify that the assigned IP is in the correct range and that the geolocation matches the data center location.

An important consideration for cloud networks: AWS, Azure and GCP use subnetting to segment VPCs (Virtual Private Clouds). Each subnet in a VPC corresponds to an availability zone and has its own CIDR. IP address planning in the cloud is critical because VPCs cannot be easily resized after creation. Plan sufficiently large CIDRs with the Subnet Calculator before creating the cloud infrastructure.

Try Subnet Calculator for free
Calculate subnet, network range, broadcast and available hosts
Use Subnet Calculator >

Explore the Network