CIDR Calculator

Calculate subnet details from CIDR notation: network address, broadcast, host range, subnet mask, wildcard mask, and more.

Enter an IPv4 address, or include a prefix like 10.0.0.0/8

hub

Enter an IP address and click "Calculate" to see subnet details

info

About CIDR Calculator

CIDR (Classless Inter-Domain Routing) is a compact notation for representing an IP address together with its network prefix length, such as 192.168.1.0/24. The number after the slash tells you how many leading bits form the network portion of the address; the remaining bits identify individual hosts within that subnet. CIDR replaced the older class-based system and is now the universal language of IP address allocation — used everywhere from home routers to massive cloud VPCs.

This CIDR Calculator takes any IPv4 address and prefix length and instantly returns the full set of values that network engineers and cloud architects need: network address, broadcast address, first and last usable host IPs, subnet mask, wildcard mask, total and usable host counts, IP class, and the binary representation of the subnet mask. An interactive range visualization shows the full address span at a glance. Preset buttons for the most common prefixes (/8, /16, /24, /28, /30, /32) let you jump straight to standard configurations without typing.

Every calculation runs entirely inside your browser. No IP address, subnet plan, or infrastructure detail is ever sent to a server or logged anywhere. Whether you are designing a production VPC, writing firewall rules, or studying for a networking certification, your data stays completely private on your own device. The tool is free with no account required and no rate limits.

star

Key Features

check_circle

12 subnet values in one click

A single calculation returns the network address, broadcast address, first and last usable hosts, subnet mask, wildcard mask, total hosts, usable hosts, IP class, binary mask, prefix length, and CIDR notation — everything you normally have to compute separately.

check_circle

Interactive prefix slider

Drag the range slider or choose from the dropdown to set any prefix from /0 to /32. Preset buttons for /8, /16, /24, /28, /30, and /32 cover the most common subnet sizes without any typing.

check_circle

IP range visualization

A visual timeline maps the network address, first usable host, last usable host, and broadcast address in sequence, making it easy to confirm a range covers what you need before committing it to a config.

check_circle

Accepts CIDR and bare IP input

Type an address with the prefix (10.0.0.0/8) or without (defaults to /24). The prefix dropdown and slider stay in sync whichever input style you use.

check_circle

One-click copy for every field

Hover any result card to reveal a copy button. Grab the subnet mask for a firewall rule, the wildcard mask for an ACL, or the host range for documentation without retyping.

check_circle

Fully client-side, no data sent

All IP math runs locally in JavaScript with no external libraries. Your network topology and address plan never leave your browser session.

help

How to Use

01

Enter IP Address

Type an IPv4 address in the input field, either standalone (e.g., 10.0.0.0) or in CIDR notation (e.g., 10.0.0.0/8). You can also use the slider or dropdown to set the prefix length.

02

Calculate

Click "Calculate" or press Enter to compute the full subnet details. Use the preset buttons (/8, /16, /24, /28, /30, /32) for quick common configurations.

03

Review Results

View the results grid showing network address, broadcast address, host range, masks, host counts, IP class, and binary mask. Click any value to copy it to your clipboard.

code_blocks

Example

Entering 192.168.1.0/24 returns all twelve subnet values instantly, including the usable host range and masks needed for firewall rules.

CIDR input
192.168.1.0/24
Subnet details
CIDR Notation:      192.168.1.0/24
Network Address:    192.168.1.0
Broadcast Address:  192.168.1.255
First Usable Host:  192.168.1.1
Last Usable Host:   192.168.1.254
Subnet Mask:        255.255.255.0
Wildcard Mask:      0.0.0.255
Total Hosts:        256
Usable Hosts:       254
IP Class:           Class C
Binary Mask:        11111111.11111111.11111111.00000000
Prefix Length:      /24
lightbulb

Common Use Cases

  • arrow_circle_right

    Planning cloud VPC address spaces

    When creating a VPC in AWS, GCP, or Azure you must supply a CIDR block for the network and smaller blocks for each subnet. Use this tool to confirm that your chosen ranges do not overlap and that each subnet holds enough host addresses for the instances you plan to deploy.

  • arrow_circle_right

    Writing firewall rules and ACLs

    Cisco IOS access control lists and many firewall platforms require a wildcard mask rather than a subnet mask to match a range. Calculate the wildcard for any prefix here and copy it directly into your rule without manually inverting the bits.

  • arrow_circle_right

    Diagnosing connectivity issues

    When two hosts cannot reach each other, checking whether both IPs fall within the same subnet is one of the first diagnostic steps. Enter one address and its prefix to see the full host range and confirm whether a remote IP is on the same network.

  • arrow_circle_right

    Studying for networking certifications

    CCNA, Network+, and similar exams include subnet calculation questions under time pressure. Use the tool to check your manual calculations and build intuition for how prefix length affects host count and address boundaries.

  • arrow_circle_right

    Designing small-link point-to-point subnets

    A /30 subnet provides exactly two usable host addresses, ideal for router-to-router links where no extra addresses should be allocated. Use the preset button to jump straight to /30 or /31 configurations and verify the host range before provisioning.

quiz

Frequently Asked Questions

What is a CIDR Calculator? expand_more
A CIDR Calculator is a networking tool that takes an IP address and a prefix length (e.g., /24) and computes detailed subnet information including the network address, broadcast address, usable host range, subnet mask, wildcard mask, and total number of hosts. It helps network engineers quickly plan and troubleshoot IP address allocations.
What does the prefix length (e.g., /24) mean? expand_more
The prefix length indicates how many of the 32 bits in an IPv4 address are used for the network portion. A /24 means the first 24 bits identify the network and the remaining 8 bits are available for host addresses, giving 256 total IPs (254 usable). A shorter prefix like /16 provides a larger network with more hosts, while a longer prefix like /30 creates a very small subnet.
What is the difference between subnet mask and wildcard mask? expand_more
A subnet mask marks which bits of an IP address belong to the network (1s) versus the host (0s). For example, /24 gives a subnet mask of 255.255.255.0. A wildcard mask is the bitwise inverse, swapping 1s and 0s (0.0.0.255 for /24). Wildcard masks are commonly used in Cisco ACLs and OSPF configurations to match ranges of addresses.
Is my network data sent to a server? expand_more
No. All calculations are performed entirely in your browser using JavaScript. No IP addresses or subnet information is transmitted to any server. Your network planning data remains completely private and secure on your device.
How do I find the number of usable hosts for a given prefix? expand_more
The total number of addresses in a subnet is 2 raised to the power of (32 minus the prefix length). For /24 that is 2^8 = 256 total addresses. Subtract 2 for the network and broadcast addresses to get the usable host count — 254 for /24. Exceptions apply at /31 (2 usable, for point-to-point links) and /32 (1 address, a host route). The calculator shows both total and usable counts automatically.
What is the difference between a CIDR Calculator and a JSON Formatter or Token Generator? expand_more
A CIDR Calculator is a domain-specific networking tool for IPv4 subnet math — it converts an IP address and prefix length into network boundaries, masks, and host counts used in routing, firewalls, and cloud infrastructure. A JSON Formatter reformats structured data for readability, and a Token Generator produces random strings for authentication. They operate on entirely different inputs and serve unrelated workflows.
Can I use this tool for IPv6 addresses? expand_more
Not currently. The tool performs 32-bit IPv4 arithmetic and accepts dotted-decimal notation only. IPv6 uses 128-bit addresses in hexadecimal colon notation and requires separate calculation logic. This tool is designed specifically for IPv4 CIDR planning.
What do the /28 and /30 presets represent? expand_more
A /28 gives 16 total addresses (14 usable) and is a common choice for small application tiers in cloud subnets. A /30 gives 4 total addresses (2 usable) and is the traditional choice for point-to-point router links where only two endpoints need addresses. The preset buttons let you calculate either configuration in one click without adjusting the slider.