Skip to content
Plaintools

CIDR calculator

Enter an IPv4 address with CIDR prefix notation or pick from standard presets. The calculator computes network and broadcast addresses, netmask, wildcard mask, usable IP range, host capacity, and binary encodings. All calculations run client-side in your browser.

Runs locally in your browser · No network requests

Presets:

Enter an IPv4 block like 10.0.0.0/16, 192.168.1.50/24, or 172.16.0.0/12

/

/16 (255.255.0.0)

CIDR Prefix Slider:/16 (255.255.0.0)
/0 (0.0.0.0)/8 (/8 VPC)/16 (/16 LAN)/24 (/24 Class C)/32 (Single Host)

CIDR Calculation Breakdown

Network CIDR

10.0.0.0/16

Base: 10.0.0.0

Subnet Mask

255.255.0.0

/16

Usable Hosts

65,534

Total: 65,536

Wildcard Mask

0.0.255.255

Host bits: 16

Addressing & Routing Specifications

Network Address (CIDR Base)
10.0.0.0
Usable Host Range
10.0.0.1 – 10.0.255.254
First Usable Host
10.0.0.1
Last Usable Host
10.0.255.254
Broadcast Address
10.0.255.255
Subnet Mask
255.255.0.0
Wildcard (Inverted) Mask
0.0.255.255
Total Addresses
65,536 (2^16)
Usable Host Capacity
65,534
Address Class & Scope
Class A · Private (RFC 1918 Class A)

Binary & Hexadecimal Encodings

IP Address:00001010.00000000.00000000.000000000x0a000000
Subnet Mask:11111111.11111111.00000000.000000000xffff0000
Wildcard Mask:00000000.00000000.11111111.11111111~mask
Network Route:00001010.00000000.00000000.000000000x0a000000
Broadcast:00001010.00000000.11111111.111111110x0a00ffff

Example

10.0.0.0/16 private cloud VPC

A 10.0.0.0/16 CIDR block provides 65,536 total IP addresses and 65,534 usable hosts ranging from 10.0.0.1 to 10.0.255.254, with netmask 255.255.0.0 and broadcast 10.0.255.255.

Related: Hash generator, Subnet calculator

FAQ

Does this CIDR calculator send my network IP addresses to a server?
No. All CIDR parsing and bitwise IP arithmetic execute 100% locally in your browser. No IP addresses or network topologies are ever transmitted, tracked, or stored.
What is the difference between a CIDR calculator and a subnet calculator?
Both calculate network boundaries, but a CIDR calculator emphasizes Classless Inter-Domain Routing notation (e.g. /16 or /24), routing prefix lengths, address blocks, and bit aggregation used in routing tables and cloud VPC configurations.
How do point-to-point /31 and single host /32 subnets work?
Under RFC 3021, a /31 prefix assigns 2 usable addresses directly to point-to-point links without wasting network and broadcast addresses. A /32 prefix denotes a single host route with exactly 1 usable address (e.g. for loopback interfaces or firewall rules).
What is an inverted wildcard mask?
A wildcard mask is calculated by inverting all bits of the subnet mask (255.255.255.255 − subnet mask). It indicates which bits in an IP address should be inspected (0) versus ignored (1) in router ACLs and firewall rules.
How do I calculate an IPv4 CIDR block without this page?
Split the CIDR string 'IP/prefix' into octets and prefix n (0..32). Parse IP into 32-bit uint: ipInt = (o1<<24) | (o2<<16) | (o3<<8) | o4. Compute maskInt = n === 0 ? 0 : (0xffffffff << (32 - n)) >>> 0. Compute wildcardInt = (~maskInt) >>> 0. Network ID = (ipInt & maskInt) >>> 0; Broadcast = (networkInt | wildcardInt) >>> 0. Total hosts = 2^(32 - n). Usable hosts = n === 32 ? 1 : n === 31 ? 2 : Math.max(0, totalHosts - 2). First usable = networkInt + 1; last usable = broadcastInt - 1. Convert 32-bit integers back to dotted-decimal format: (x >>> 24) & 255, (x >>> 16) & 255, (x >>> 8) & 255, x & 255.