Subnet / CIDR Calculator

Calculate subnet details from any IP address and CIDR prefix. View network, broadcast, host range, netmask, and wildcard mask. Free online tool.

Your data never leaves your browser
/

How to Use

  1. Enter an IP address (e.g., 192.168.1.0) or CIDR notation (192.168.1.0/24).
  2. Select a CIDR prefix length using the quick buttons or the number input.
  3. View all subnet details: network, broadcast, host range, masks, and more.
  4. Click Copy to copy all subnet information to your clipboard.

Understanding Subnetting

Subnetting divides a network into smaller segments to improve performance, security, and IP address management. The CIDR prefix length determines how many bits represent the network portion of the address. A /24 network has 8 host bits (256 addresses), while a /28 has 4 host bits (16 addresses).

Common Subnet Sizes

  • /24 (255.255.255.0) — 254 usable hosts. The most common subnet for small networks.
  • /25 (255.255.255.128) — 126 usable hosts. Splits a /24 in half.
  • /26 (255.255.255.192) — 62 usable hosts. Good for small office segments.
  • /27 (255.255.255.224) — 30 usable hosts. Common for server VLANs.
  • /28 (255.255.255.240) — 14 usable hosts. Used for small DMZ segments.
  • /30 (255.255.255.252) — 2 usable hosts. Point-to-point links between routers.
  • /16 (255.255.0.0) — 65,534 usable hosts. Large internal networks.

IP Address Classes

The original classful addressing system divided IP space into classes: Class A (1.0.0.0–126.255.255.255) for very large networks, Class B (128.0.0.0–191.255.255.255) for medium networks, and Class C (192.0.0.0–223.255.255.255) for small networks. While CIDR has replaced classful addressing, understanding classes helps with recognizing private ranges and default masks.

Related Tools

Convert numbers between bases with the Number Base Converter. Calculate file permissions with the chmod Calculator. Look up HTTP status codes with the HTTP Status Code Explorer. Generate UUIDs for network devices with the UUID Generator. Generate secure passwords with the Password Generator. Create hashes for network verification with the Hash Generator.

Frequently Asked Questions

What is a subnet?
A subnet (subnetwork) is a logical subdivision of an IP network. Subnetting divides a larger network into smaller, more manageable segments. Each subnet has a network address, a broadcast address, and a range of usable host addresses.
What does CIDR notation mean?
CIDR (Classless Inter-Domain Routing) notation expresses an IP address and its network prefix length. For example, 192.168.1.0/24 means the first 24 bits are the network portion, leaving 8 bits (256 addresses) for hosts.
What is the difference between a netmask and a wildcard mask?
A netmask marks network bits with 1s and host bits with 0s (e.g., 255.255.255.0). A wildcard mask is the inverse — host bits are 1s and network bits are 0s (e.g., 0.0.0.255). Wildcard masks are used in Cisco ACLs and OSPF configurations.
What are RFC 1918 private IP ranges?
RFC 1918 defines three private IP ranges: 10.0.0.0/8 (Class A), 172.16.0.0/12 (Class B), and 192.168.0.0/16 (Class C). These addresses are not routable on the public internet and are used for internal networks.
Why do I lose 2 addresses in a subnet?
In subnets /30 and larger, the first address is reserved as the network address and the last address as the broadcast address. A /24 subnet has 256 total addresses but only 254 usable for hosts. Exception: /31 subnets (point-to-point links) use both addresses.

AI agent tools available. The CodeTidy MCP Server gives Claude, Cursor, and other AI agents access to 47 developer tools. One command: npx @codetidy/mcp

Drop file to load