Illustration of a CIDR block 192.168.1.0/24 splitting into network address, broadcast address, and usable host range chips

IP/Subnet Calculator

Enter an IPv4 address with a CIDR prefix (e.g. 192.168.1.10/24). Runs entirely in your browser.


ℹ️ How this works
  • The prefix (e.g. /24) determines the netmask; the network address is your IP with all host bits zeroed, and the broadcast address is the network address with all host bits set to 1.
  • Usable hosts excludes the network and broadcast addresses — except /31 (both addresses usable, RFC 3021, common on point-to-point links) and /32 (a single host, no broadcast concept).
  • IPv4 only on this page — broadcast addresses don't exist in IPv6. The JSON API below also accepts IPv6 CIDR input.
  • Runs entirely client-side — nothing you enter here is ever sent anywhere.
💻 Show API usage example (cURL)
curl -sS "https://devops.majbase.com/subnet-calculator/api?cidr=192.168.1.10/24"

Returns JSON: {"network_address", "broadcast_address", "netmask", "wildcard_mask", "total_addresses", "usable_hosts_count", "first_usable", "last_usable", "is_private", ...}. Also accepts IPv6 input (e.g. 2001:db8::1/64) — broadcast_address is simply omitted there, since IPv6 has no broadcast concept.

🤖 Use this API as a Claude Skill

Want an AI agent (Claude Code, claude.ai, or anything else that supports the Agent Skills format) to use this tool for you on request? Download the skill below and add it:

⬇️ Download SKILL.md · View raw