Subnet Calculator
A subnet calculator computes IPv4 network parameters — network address, broadcast address, subnet mask, wildcard mask, host range, and usable host count — from an IP address and CIDR prefix length (/0 through /32).
Enter an IPv4 address and CIDR prefix (e.g., 192.168.1.0/24). ScanSuite calculates the network address, broadcast address, subnet mask, wildcard mask, first and last usable host, and total host count instantly in your browser.
Introduction to IPv4 Subnet Calculation
Subnetting divides an IPv4 network into smaller segments for routing efficiency, broadcast domain isolation, and security zone separation. Every network engineer, cloud architect, and security analyst works with CIDR notation like 10.0.0.0/8 or 192.168.1.0/24 daily.
ScanSuite's free subnet calculator accepts any IPv4 address paired with a CIDR prefix from /0 to /32 and returns network address, broadcast address, subnet mask, wildcard mask, usable host range, and host count — no command-line ipcalc or spreadsheet required.
What Is a Subnet Calculator?
A subnet calculator performs bitwise operations on a 32-bit IPv4 address and prefix length to derive network boundaries. The prefix length specifies how many leading bits are fixed as the network portion; remaining bits identify individual hosts within that subnet.
Manual calculation requires converting addresses to binary, applying the mask, and computing broadcast as the last address in the range. Our tool automates this per RFC 4632 CIDR conventions, eliminating arithmetic errors during network design, firewall rule authoring, and ACL planning.
Why Use an Online Subnet Calculator?
Subnet math is error-prone under time pressure — a single bit mistake misconfigures firewall rules, DHCP scopes, or cloud VPC CIDR blocks. Browser-based calculators provide instant, verified results on any device without installing ipcalc, sipcalc, or spreadsheet templates.
Cloud deployments on AWS, Azure, and GCP require precise CIDR planning to avoid overlapping ranges that break peering and VPN tunnels. Security teams use subnet calculations to define scan ranges, SIEM allowlists, and segmentation boundaries. A reliable calculator saves hours during network audits and migration projects.
Who Uses Subnet Calculators?
Network engineers design campus and datacenter addressing schemes. Cloud architects plan VPC subnets, route tables, and security group boundaries across availability zones. System administrators configure DHCP pools and static IP reservations within defined ranges.
Security analysts define scan targets and firewall CIDR rules. Certification candidates studying for CCNA, Network+, and CISSP practice subnetting exercises. DevOps engineers validate Terraform and CloudFormation network modules before apply.
How the Subnet Calculator Works
Enter an IPv4 address and select or type a CIDR prefix (/0–/32). The calculator converts the address to a 32-bit binary value, applies a mask derived from the prefix length, and computes the network address by ANDing the IP with the subnet mask.
The broadcast address is the last address in the subnet — all host bits set to 1. Usable hosts exclude the network and broadcast addresses on most subnets (/31 and /32 have special cases per RFC 3021). Results display in dotted-decimal, binary, hex, and CIDR formats for copy-ready documentation.
How to calculate a subnet mask
For 192.168.1.0/24, the network address is 192.168.1.0, broadcast is 192.168.1.255, subnet mask is 255.255.255.0, and usable hosts are 192.168.1.1 through 192.168.1.254 — 254 assignable addresses. This is the most common small-office subnet size.
Example: Point-to-point link 10.0.0.0/30
For 10.0.0.0/30, the subnet mask is 255.255.255.252 with four total addresses: network 10.0.0.0, first usable 10.0.0.1, second usable 10.0.0.2, and broadcast 10.0.0.3. /30 subnets are standard for router-to-router links where only two host addresses are needed.
CIDR reference
| Subnet mask | Usable hosts | |
|---|---|---|
| /8 | 255.0.0.0 | 16777214 |
| /9 | 255.128.0.0 | 8388606 |
| /10 | 255.192.0.0 | 4194302 |
| /11 | 255.224.0.0 | 2097150 |
| /12 | 255.240.0.0 | 1048574 |
| /13 | 255.248.0.0 | 524286 |
| /14 | 255.252.0.0 | 262142 |
| /15 | 255.254.0.0 | 131070 |
| /16 | 255.255.0.0 | 65534 |
| /17 | 255.255.128.0 | 32766 |
| /18 | 255.255.192.0 | 16382 |
| /19 | 255.255.224.0 | 8190 |
| /20 | 255.255.240.0 | 4094 |
| /21 | 255.255.248.0 | 2046 |
| /22 | 255.255.252.0 | 1022 |
| /23 | 255.255.254.0 | 510 |
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
| /31 | 255.255.255.254 | 2 (point-to-point) |
| /32 | 255.255.255.255 | 1 (single host) |
ScanSuite vs Command-Line ipcalc
| Feature | ScanSuite Subnet Calculator | ipcalc / sipcalc | |
|---|---|---|---|
| Installation | None — browser only | Requires CLI package | |
| IPv4 CIDR /0–/32 | Full support | Full support | |
| IPv6 support | Not supported (IPv4 only) | Varies by tool version | |
| Output formats | Decimal, binary, hex, CIDR | Decimal and binary | |
| Copy results | One-click copy | Manual terminal copy |
Subnet Calculator Troubleshooting
If results seem unexpected, verify the IP address is valid dotted-decimal (four octets, each 0–255) and the prefix is between /0 and /32 inclusive. Entering a host address like 192.168.1.50/24 correctly calculates the containing subnet 192.168.1.0/24 — the tool normalizes to network boundaries.
For /31 subnets per RFC 3021, both addresses may be usable on point-to-point links — behavior differs from /30 and larger subnets. /32 represents a single host route with no network or broadcast distinction. Consult RFC 3021 when configuring modern router interconnections.
Related tools
- packet-analyzer —
- Port Scanner — Free online Nmap port scan
- DNS Lookup — Check DNS records
- What Is My IP — Check your public IP address
- DNS Lookup — Resolve domain names to IP addresses
- Subdomain Finder — Map subdomains across hosts in a subnet
- Port Scanner — Scan open ports on subnet hosts
- SSL Checker — Inspect TLS certificates for domains
- SPF/DKIM Checker — Validate email authentication records
- Packet Analyzer — Analyze network traffic in PCAP files
- Security Headers Checker — Audit HTTP security headers
- CORS Checker — Test cross-origin resource sharing policies
- All Free Tools — Browse the complete ScanSuite tool catalog
Frequently Asked Questions
How do I calculate a subnet mask?
Start from the CIDR prefix, which is the number of network bits. /24 means 24 ones followed by 8 zeros, which gives 255.255.255.0. The usable hosts are 2^(32 − prefix) − 2. A /26, for example, has a mask of 255.255.255.192 and 62 usable hosts. Enter an IP and prefix above to get the network, broadcast address and host range automatically.
What does /24 mean in an IP address?
It is CIDR notation: the first 24 bits are the network part. 192.168.1.0/24 covers 192.168.1.0–192.168.1.255, which is 254 usable hosts.
How many hosts are in a /27, /28 or /29?
A /27 has 30 usable hosts (mask 255.255.255.224), a /28 has 14 (255.255.255.240) and a /29 has 6 (255.255.255.248). A /31 is a special case used for point-to-point links, and a /32 is a single host.
What is a subnet calculator?
A utility that converts an IP address and CIDR prefix (or dotted mask) into network address, broadcast, usable host range, and related fields so you do not have to do the binary math by hand.
How does a subnet mask calculator work?
Enter an IPv4 address and a prefix such as /24, or a dotted mask such as 255.255.255.0. The calculator returns the network address, broadcast address, wildcard mask, and usable host count. A /24 has 256 addresses and 254 usable hosts.
How do I use CIDR notation?
CIDR notation combines an IPv4 address with a prefix length separated by a slash. The prefix length (0\u201332) indicates how many leading bits are fixed as the network portion. For example, 192.168.1.0/24 means the first 24 bits define the network and the remaining 8 bits identify 256 addresses. A /24 equals subnet mask 255.255.255.0. Shorter prefixes like /16 cover larger networks; longer prefixes like /28 cover smaller segments.
What CIDR prefix range does ScanSuite support?
ScanSuite supports the full IPv4 CIDR range from /0 through /32. A /0 represents the entire IPv4 address space. A /32 represents a single host address. All standard prefix lengths used in enterprise networking, cloud VPCs, and certification exams are supported. This tool calculates IPv4 subnets only \u2014 it does not support IPv6 prefix calculations or /64 planning.
What is the difference between network address and broadcast address?
The network address has all host bits set to zero \u2014 it identifies the subnet itself and is not assignable to a device. The broadcast address has all host bits set to one \u2014 it represents all hosts on the subnet for broadcast traffic and is also not assignable. In 192.168.1.0/24, the network address is 192.168.1.0 and the broadcast is 192.168.1.255. Usable hosts fall between these boundaries.
How many usable hosts are in a /24 subnet?
A /24 subnet contains 256 total addresses (2^8 host bits). Subtracting the network address and broadcast address leaves 254 usable host addresses \u2014 typically 192.168.1.1 through 192.168.1.254. Some cloud providers reserve additional addresses within each subnet for infrastructure purposes. AWS, for example, reserves five addresses in every subnet beyond the standard network and broadcast reservations.
What is a wildcard mask?
A wildcard mask is the inverse of a subnet mask \u2014 zero bits indicate bits that must match, and one bits indicate bits that are ignored. Subnet mask 255.255.255.0 corresponds to wildcard mask 0.0.0.255. Wildcard masks appear in Cisco IOS access control lists and some firewall rule syntax. Our calculator displays both masks so you can copy the correct format for your target platform.
Does this subnet calculator support IPv6?
No. ScanSuite's subnet calculator is designed exclusively for IPv4 addressing with CIDR prefixes /0 through /32. IPv6 uses 128-bit addresses with different subnetting conventions, typically /64 for standard subnets. If you need IPv6 planning tools, use dedicated IPv6 calculators or command-line utilities like sipcalc with IPv6 support. Our related DNS lookup tool can resolve AAAA records separately.
What is VLSM (Variable Length Subnet Masking)?
VLSM allows dividing a network into subnets of different sizes using varying prefix lengths. For example, a /24 can be split into two /25 subnets (128 addresses each) or a /25 plus two /26 subnets (128 + 64 + 64). VLSM maximizes address efficiency compared to fixed-length subnetting. Our calculator computes one subnet at a time \u2014 run multiple calculations to plan a full VLSM scheme.
When should I use a /30 vs /31 subnet?
A /30 subnet provides four addresses with two usable hosts \u2014 traditional for point-to-point router links. RFC 3021 defines /31 subnets with two addresses where both may be usable on point-to-point interfaces, conserving address space on links between routers. Modern IOS, Junos, and Linux support RFC 3021 /31 links. Use /30 when compatibility with older equipment is required; use /31 for efficient modern deployments.
How do I calculate subnets for AWS VPC planning?
Start with your VPC CIDR block (e.g., 10.0.0.0/16) and use the calculator to subdivide into smaller subnets for each availability zone. A common pattern creates /24 subnets per AZ for application tiers. Verify no overlap between VPC CIDR, VPN customer gateway ranges, and peered VPC blocks. Remember AWS reserves five addresses per subnet. Document each calculated range before applying CloudFormation or Terraform.
What is supernetting or route aggregation?
Supernetting combines multiple contiguous subnets into a larger summary route advertised to upstream routers. Four /24 networks (192.168.0.0/24 through 192.168.3.0/24) aggregate into one /22 route (192.168.0.0/22). This reduces routing table size and improves convergence. Use the calculator to verify that candidate subnets are contiguous and align on correct bit boundaries before configuring route summarization.
Why does my calculator show a different network address than my input IP?
The calculator normalizes any valid host address to its containing network address by applying the subnet mask. Entering 192.168.1.50/24 correctly returns network 192.168.1.0 because the /24 mask fixes the first three octets. This is expected behavior \u2014 the network address is always the first address in the subnet with host bits zeroed. Your input IP falls within the calculated range.
Is this subnet calculator free?
Yes. ScanSuite's IPv4 subnet calculator is free to use with no account required. Calculate unlimited subnets directly in your browser without subscription, signup, or usage limits on the free tier. Premium ScanSuite features include network scanning, PCAP analysis, and enterprise reporting \u2014 but the subnet calculator remains free for all users including students, professionals, and certification candidates.
How does subnetting improve network security?
Subnetting creates broadcast domain boundaries that limit the scope of layer-2 traffic and enable granular firewall rules between segments. Separate subnets for servers, workstations, IoT devices, and management interfaces allow deny-by-default ACLs between zones. Security teams define scan ranges per subnet for targeted vulnerability assessment. Micro-segmentation in datacenters and cloud environments relies on precise CIDR planning calculated with subnet tools.
What is the relationship between subnet mask and CIDR prefix?
The CIDR prefix length and subnet mask express the same information differently. A /24 prefix means 24 network bits, equivalent to subnet mask 255.255.255.0. A /16 equals 255.255.0.0. A /28 equals 255.255.255.240. The prefix is simply the count of consecutive one bits in the mask. Our calculator displays both formats and converts between them automatically for any valid IPv4 input.
Can I use this tool for firewall rule configuration?
Yes. Copy the calculated CIDR notation (e.g., 10.0.1.0/24) directly into firewall rules, security group definitions, WAF IP sets, and cloud ACL entries. Verify whether your platform uses subnet mask or wildcard mask syntax. Ensure the CIDR accurately covers intended hosts without being overly broad \u2014 using 10.0.0.0/8 when 10.0.1.0/24 suffices exposes unnecessary address space in allow rules.
What RFCs define IPv4 subnetting and CIDR?
RFC 791 defines the original IPv4 protocol. RFC 950 introduced subnetting. RFC 1519 and RFC 4632 define Classless Inter-Domain Routing (CIDR), replacing classful addressing with flexible prefix lengths. RFC 3021 covers /31 prefix usage on point-to-point links. RFC 1918 defines private address space commonly used in calculated subnets. ScanSuite calculations conform to these IETF standards for accurate, interoperable results.
How do I avoid overlapping subnets in cloud deployments?
Document all allocated CIDR blocks in a central IP address management spreadsheet before deploying new VPCs, VPN tunnels, or peering connections. Use the calculator to verify each new subnet falls entirely within its parent block without crossing boundaries. Overlapping ranges between peered VPCs or VPN customer gateways cause silent routing failures. Plan address space with growth margins \u2014 expanding CIDR blocks post-deployment requires migration.
Summary
ScanSuite's free IPv4 subnet calculator computes network address, broadcast, subnet mask, wildcard mask, and usable host range for any CIDR prefix /0–/32. Use it for network design, cloud VPC planning, firewall rule authoring, and certification study — directly in your browser without CLI tools or an account.