CIDR / Subnet Calculator Online

Calculate network, broadcast, host range, and mask from a CIDR block in your browser. Everything runs locally.

Your CIDR input is processed locally in your browser and nothing is uploaded to a server.

Built and maintained by Udit Agarwal

CIDR Notation and Subnetting, Explained

Need to convert an IP between formats? Try the IP Converter.

About CIDR / Subnet Calculator

This cidr calculator turns an IPv4 CIDR block like 192.168.1.0/24 into a full subnet breakdown: network address, broadcast address, netmask, wildcard mask, first and last usable host, prefix length, and total and usable host counts. As a subnet calculator it helps network engineers, sysadmins, DevOps, and developers plan IP ranges, size VPC and VLAN subnets, write firewall and routing rules, and double-check ACLs without doing binary math by hand. Just type a block and the results update instantly. It correctly handles edge cases such as /31 point-to-point links and /32 host routes, where the usual minus-two host rule does not apply. Everything is processed locally in your browser, so your network details and your data never leave your device.

Features

  • Parses any IPv4 CIDR block (0-32 prefix) into a complete subnet report
  • Shows network and broadcast addresses for the block
  • Derives the netmask and wildcard mask from the prefix length
  • Lists the first and last usable host addresses in the range
  • Reports total host count and usable host count
  • Handles /31 and /32 edge cases where the host range differs
  • Normalises any address in the block to its network base automatically
  • Updates results live as you type, with clear validation messages

How to use the CIDR / Subnet Calculator

  1. Type or paste a CIDR block such as 192.168.1.0/24 into the CIDR block field.
  2. Read the network, broadcast, netmask and wildcard values from the results grid.
  3. Check the first host, last host, total hosts and usable hosts to confirm the range fits your needs.
  4. Adjust the prefix length to compare how different subnet sizes change the host count.

Example

Input

192.168.1.0/24

Output

Network:      192.168.1.0
Broadcast:    192.168.1.255
Netmask:      255.255.255.0
Wildcard:     0.0.0.255
First host:   192.168.1.1
Last host:    192.168.1.254
Prefix:       /24
Total hosts:  256
Usable hosts: 254

A /24 block expanded into its full subnet details.

Common errors & troubleshooting

  • Entering an address without a prefix, like 192.168.1.0. — Add a slash and prefix length, for example 192.168.1.0/24, so the calculator knows the subnet size.
  • Using an octet above 255, such as 192.168.300.0/24. — Each of the four octets must be between 0 and 255; correct the out-of-range octet and re-enter the block.
  • Expecting usable hosts to be total minus two on a /31 or /32. — For /31 (point-to-point) and /32 (single host) blocks both addresses are usable, so the tool does not subtract the network and broadcast addresses.
  • Typing a prefix greater than 32 for IPv4. — IPv4 prefix lengths range from 0 to 32; use a value in that range. IPv6 blocks are not supported.
  • Entering a host address like 192.168.1.42/24 and expecting it back unchanged. — The CIDR calculator normalises the input to the network base, so 192.168.1.42/24 reports the network as 192.168.1.0.

Frequently asked questions

What is a CIDR calculator and what does it show?
A CIDR calculator expands an IPv4 block into the network and broadcast addresses, netmask, wildcard mask, first and last usable host, prefix length, and both total and usable host counts.
How do I convert a CIDR prefix to a subnet mask?
Enter a block such as 10.0.0.0/20 in the CIDR calculator and it displays the matching netmask (255.255.240.0) and the wildcard mask alongside it.
How are usable hosts calculated for a subnet?
For most blocks usable hosts equal total addresses minus the network and broadcast addresses. For /31 and /32 blocks the CIDR calculator counts every address as usable.
Does this CIDR calculator support IPv6 subnets?
No, this tool handles IPv4 CIDR blocks with prefixes from 0 to 32. For IPv6 work, convert addresses with the IPv6 to IPv4 Converter instead.
Is my IP and network data kept private in the CIDR calculator?
Yes. The CIDR calculator runs entirely in your browser, nothing is uploaded to a server, and your network details never leave your device.

Related tools

More Network tools

  • IPv6 ↔ IPv4 Converter — Convert between IPv4 and IPv6 (mapped/expanded/compressed) and extract embedded IPv4.
  • User Agent Parser — Parse a User-Agent string into browser, engine, operating system and device, in your browser.
  • HAR File Viewer — Open a HAR file and inspect the request waterfall, headers, timings and sizes, in your browser.
  • IP Range to CIDR — Convert a start and end IP address into the minimal set of CIDR blocks, and back.
  • Set-Cookie Parser — Parse Set-Cookie and Cookie headers into a readable table of names, values and attributes.
  • IP Address to Integer Converter — Convert an IPv4 or IPv6 address to its integer, hex and binary form, and back.
  • MAC Address Generator — Generate random or vendor-prefixed MAC addresses in several formats.
  • WiFi QR Code Generator — Create a scannable QR code that joins a WiFi network, with correct escaping.
  • Download Time Calculator — Estimate how long a file takes to transfer at a given connection speed.
  • DMARC Record Generator — Build and validate a DMARC DNS TXT record with policy, reporting and alignment.
  • SPF Record Generator — Build and validate the SPF TXT record that stops others sending mail as your domain.
  • Port Number Lookup — What runs on a TCP or UDP port — search by number or service name.

See all Network tools (24) · All tools