Calculate network addresses, convert IP ranges to CIDR blocks, and check subnet membership. Free, client-side, no data sent to any server.
A subnet calculator takes a CIDR block like 10.0.0.0/8 and breaks it down into its network address, broadcast address, usable host range, subnet mask, and wildcard mask. It’s essential for network engineers configuring routers, firewalls, and access control lists — and for security teams scoping which addresses fall within monitored ranges.
This calculator runs entirely in your browser. No data is sent to any server. It supports all IPv4 prefix lengths from /0 to /32, including iptables and Fail2Ban configurations where CIDR notation is used to define blocked or allowed ranges.
CIDR (Classless Inter-Domain Routing) replaced the old class-based system (Class A/B/C) in 1993. Instead of fixed 8-, 16-, or 24-bit boundaries, CIDR lets you define a network with any prefix length from 0 to 32. The prefix tells you how many leading bits are the network portion; the remaining bits are for host addresses.
The formula is straightforward: a /n prefix gives you 232−n total addresses. Subtract 2 for the network and broadcast addresses, and you get usable hosts. A /24 gives 254 usable hosts, a /28 gives 14, and a /32 is a single host. The special case /31 (RFC 3021) provides 2 usable addresses for point-to-point links.
| Prefix | Subnet Mask | Addresses | Usable Hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /24 | 255.255.255.0 | 256 | 254 |
| /28 | 255.255.255.240 | 16 | 14 |
| /30 | 255.255.255.252 | 4 | 2 |
| /32 | 255.255.255.255 | 1 | 1 |
Subnet calculations are foundational to network security. When you receive a threat intelligence report about a malicious IP range, you need to know which CIDR blocks to feed into your firewall rules. Use our IP threat lookup to check whether a specific address has been observed attacking our global honeypot network, or browse top attacking IPs to see which addresses are most active.
If you’re working with Fail2Ban, iptables, or Nginx deny lists, this calculator helps you convert between IP ranges and CIDR blocks — a common task when translating incident reports into actionable firewall rules.
For programmatic access, our IP check API lets you query individual IPs or ranges directly from your scripts. Protect entire networks with SikkerGuard, or monitor your infrastructure ranges with range alerts that notify you when IPs in your subnets appear in attack traffic. Browse top attacking IPs, detection patterns, or targeted emails for a broader view of the threat landscape.