# CIDR / Subnet Calculator

URL: https://phishdestroy.io/developer-tools/cidr-subnet-calculator
Category: General dev
Where it runs: Runs locally (nothing you enter is uploaded)

Enter an IPv4 address with a prefix length to get its network and broadcast address, mask, first and last host and number of usable hosts. Useful when you turn a hosting range from RDAP or an abuse report into a firewall or blocklist rule.

## Example input

Address inside a /26

```
198.51.100.77/26
```

Network 198.51.100.64, broadcast 198.51.100.127, mask 255.255.255.192, hosts 198.51.100.65 to 198.51.100.126 (62 usable): the /26 that contains .77.

## FAQ

### What does it calculate?

For an IPv4 address and prefix it shows the network and broadcast addresses, the subnet mask, the first and last host and the number of usable hosts. Host bits in the input are ignored, so 198.51.100.77/26 gives the 198.51.100.64/26 network.

### What are the limits?

IPv4 only, and the /prefix is required. For /31 and /32 the host fields are not meaningful (RFC 3021 point-to-point /31 links use both addresses) and /0 shows 0 usable hosts; input checks are basic, so a non-numeric octet is read as 0 rather than rejected.

### Does it look up who owns the range?

No. It is arithmetic in your browser and nothing is sent. To find the network owner and abuse contact of an IP, use the Abuse Contact Lookup.

## Related tools

- [IPv4 Range Expander](https://phishdestroy.io/developer-tools/ipv4-range-expander)
- [IPv4 Address Converter](https://phishdestroy.io/developer-tools/ip-address-converter)
- [Abuse Contact Lookup](https://phishdestroy.io/developer-tools/abuse-contact-lookup)
- [Blocklist Converter](https://phishdestroy.io/developer-tools/blocklist-converter)
- [IPv6 Expander & Compressor](https://phishdestroy.io/developer-tools/ipv6-compressor)
- [ASN Ranges Reference](https://phishdestroy.io/developer-tools/asn-reference)

All tools: https://phishdestroy.io/developer-tools
