Network & DNS🔒 Browser (client-side)API available📴 Works offlineintermediate
CIDR Subnet Calculator
Calculates IPv4 CIDR subnet parameters: network address, broadcast address, netmask, wildcard mask, and usable IP range.
Data stays in your browser
Ready to runInstant execution
Result
—What does this tool do?
Calculates IPv4 CIDR subnet parameters: network address, broadcast address, netmask, wildcard mask, and usable IP range.
Why would I use it?
- You are configuring VPC subnets in AWS, GCP, Azure, or Kubernetes clusters.
- You need to know the exact number of usable IP addresses in a CIDR block.
- You are auditing firewall allowlists and routing tables.
Real-life example
Input
192.168.1.0/24
Output
Netmask: 255.255.255.0 · Usable Range: 192.168.1.1 - 192.168.1.254 · Usable Hosts: 254
/24 provides 256 total addresses, with 2 reserved for network and broadcast.
Input → Process → Output → Next
- Input
- Enter IPv4 address with prefix length (e.g. 10.0.0.0/16).
- Process
- Performs bitwise binary subnet math and calculates host bounds.
- Output
- Comprehensive network breakdown including first/last usable IP and wildcard mask.
- Next action
- Apply the CIDR block in your cloud VPC or firewall policy.
Common mistakes
- Forgetting that cloud providers (like AWS) reserve 5 IP addresses in each subnet, not just 2.
- Confusing CIDR prefix length (/24) with subnet mask (255.255.255.0).
- Allocating subnets that overlap with existing corporate networks.
What the result means
Precise mathematical boundary definition of an IP subnet.
Privacy & security
Your input is processed entirely in your browser and never sent to a YAS server.
API
Endpoint
POST https://yas.sh/api/v1/tools/cidr-calculator
Request Header
Content-Type: application/json
cURL
curl -X POST "https://yas.sh/api/v1/tools/cidr-calculator" \
-H "Content-Type: application/json" \
-d '{"input":"192.168.1.0/24"}'JavaScript
const res = await fetch("https://yas.sh/api/v1/tools/cidr-calculator", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"input": "192.168.1.0/24"
}),
});
const data = await res.json();Python
import requests
r = requests.post("https://yas.sh/api/v1/tools/cidr-calculator", json={"input":"192.168.1.0/24"})
data = r.json()| Field | Type | Required | Description |
|---|---|---|---|
| input | string | Yes | CIDR string e.g. 192.168.1.0/24 |
Success response
{ "slug": "cidr-calculator", "networkAddress": "192.168.1.0", "usableHosts": 254 }Calculate CIDR IP ranges, netmasks, and usable host counts.
Error responses
400 VALIDATION_ERROR— invalid input or unsupported option.413 PAYLOAD_TOO_LARGE— input exceeds the 64 KB limit.429 RATE_LIMIT_EXCEEDED— rate limit exceeded (60 req/min).
Limits
- Maximum input: 64 KB per request.
- Rate limit: 60 requests/min per IP address.
- Authenticated accounts benefit from higher tier quotas.
Related tools