CIDR Calculator

Calculate network address, broadcast, subnet mask, host range, and binary representation from any CIDR notation.

Enter a CIDR range above to calculate

About this tool

The ToolNinja CIDR Calculator is a free online subnet calculator and IP range calculator. Enter any CIDR notation (e.g. 192.168.1.0/24) to instantly calculate the subnet mask, network address, broadcast address, first and last usable host, and total number of hosts โ€” all displayed with a full binary breakdown. Whether you need to calculate CIDR from an IP address, convert IP to CIDR notation, find CIDR ranges for a network, or use it as a subnetting CIDR calculator โ€” ToolNinja handles every scenario directly in your browser. The CIDR to IP range calculator shows the complete host range so you can immediately see which addresses fall within your subnet. Use it as an ip to cidr calculator when configuring cloud VPCs in AWS, GCP or Azure, as a subnet CIDR calculator for firewall rules, or as a subnetting calculator for network planning. The binary display makes it ideal for learning how CIDR notation and subnet masks work at the bit level. Everything runs 100% in your browser โ€” no login, no server calls, no data ever leaves your machine.

When to use it

  • โ†’Calculating subnet ranges for AWS VPC, GCP VPC or Azure Virtual Network CIDR blocks
  • โ†’Converting IP addresses to CIDR notation for firewall rules and security groups
  • โ†’Subnetting large networks into smaller CIDR ranges for network segmentation
  • โ†’Verifying CIDR to IP range calculations before deploying network infrastructure
  • โ†’Learning how CIDR notation and subnet masks work with the binary display
  • โ†’Calculating how many hosts fit in a given subnet for capacity planning

Tips

  • โ—†A /24 gives 254 usable hosts (256 minus network and broadcast). A /25 splits that into two subnets of 126 usable hosts each.
  • โ—†AWS VPCs reserve 5 addresses per subnet (network, broadcast, and 3 AWS-reserved). Factor this in when choosing your CIDR block.
  • โ—†Use /32 to represent a single host route and /0 to represent the default route (all traffic).

Frequently asked questions

What does CIDR stand for and what problem does it solve?

CIDR stands for Classless Inter-Domain Routing. Before CIDR, IP addresses were assigned in fixed classes (A, B, C) which wasted huge blocks of addresses. CIDR replaced this with variable-length subnet masking (VLSM) โ€” the /prefix notation lets you specify exactly how many bits are the network portion, enabling fine-grained allocation and more efficient use of the IP address space.

How do I choose the right subnet size for my use case?

Calculate the number of hosts you need and choose the smallest prefix that accommodates them, plus growth room. Formula: usable hosts = 2^(32 - prefix) - 2. For 100 hosts you need /25 (126 usable). For 500 hosts you need /23 (510 usable). In cloud environments, choose larger than you think you need โ€” subnets cannot be resized after creation without disruption.

What is the difference between the network address and the broadcast address?

The network address is the first IP in a subnet (all host bits are 0) โ€” it identifies the subnet itself and cannot be assigned to a host. The broadcast address is the last IP (all host bits are 1) โ€” packets sent to it are delivered to all hosts in the subnet. Both are reserved; usable host addresses are everything between them.

What are the private IP address ranges and when do I use them?

RFC 1918 defines three private ranges: 10.0.0.0/8 (16.7M addresses), 172.16.0.0/12 (1M addresses), and 192.168.0.0/16 (65K addresses). These are non-routable on the public internet โ€” use them for internal networks, VPCs, and home LANs. Traffic to/from these ranges must go through NAT to reach the internet. 169.254.0.0/16 is link-local (APIPA), used when DHCP fails.

Related tools

๐Ÿฅท ToolNinja