CIDR Calculator

The CIDR calculator converts a prefix length (from /0 to /32) into everything you need for subnet planning: the dotted-decimal subnet mask, its binary representation, the wildcard mask used in access lists, and the number of hosts the block contains.

Prefix lengths are the shorthand behind every IPv4 allocation, and being able to move between /24, 255.255.255.0, and 256 addresses without thinking is a core skill. This tool does the conversion for you and shows the binary form so the relationship between the prefix and the mask is easy to see.

CIDR Calculator

Get subnet mask, host count, and binary notation from a CIDR prefix.

Enter values above to see results.

Frequently Asked Questions

How many usable addresses are in a /24?
A /24 contains 256 total addresses, of which 254 are usable. The network address (e.g. 192.168.1.0) and the broadcast address (192.168.1.255) are reserved.
What is a wildcard mask?
A wildcard mask is the bitwise inverse of a subnet mask, used in Cisco access lists and routing filters. For a /24, the subnet mask 255.255.255.0 has the wildcard mask 0.0.0.255, which means the last octet can vary.

Read More

Guides that go deeper on the same topic.

More Tools

Explore the other tools in the toolkit.

Subnet Calculator
Free subnet calculator: enter an IP address and CIDR prefix to get the network address, broadcast address, subnet mask, usable IP range, and host count instantly.
IPv4 Range Calculator
Free IPv4 range calculator: enter a start and end IP address to find the smallest set of CIDR blocks covering the range, plus the total number of addresses.
VLAN Capacity Calculator
Free VLAN capacity calculator: determine the subnet size you need for your number of VLANs and devices per VLAN, including growth headroom.
Rack Power Calculator
Free rack power calculator: estimate total watts, BTU/hr, amps at 120V and 240V, cooling tons, and watts per feed for the equipment in your racks.
UPS Runtime Calculator
Free UPS runtime calculator: estimate how long your UPS battery will run under load based on wattage, battery capacity, voltage, and inverter efficiency.
BTU Calculator
Free BTU calculator: convert electrical watts to BTU/hr and the tons of cooling required for your data center, server room, or network closet.
Subnet Overlap Checker
Free subnet overlap checker: paste a list of CIDR blocks and instantly see every pair that shares addresses, before conflicts cause routing or IP assignment problems.
IPv6 Subnet Calculator
Free IPv6 subnet calculator: enter an IPv6 address and prefix length to get the network address, expanded form, total addresses, and the number of /64 subnets.
Batch CIDR Converter
Free batch CIDR converter: paste a list of subnets as CIDR, IP + mask, or bare IP and convert them all to network address, subnet mask, usable range, and host count in one click.
IP Allocation Planner
Free IP allocation planner: assign CIDR blocks inside a supernet to sites, VLANs, or teams and see used, free, and overlapping address space instantly.

Stop reaching for a spreadsheet

Obelinf keeps every subnet, device, circuit, and rack in one live source of truth, with audit logs and a topology view. Free for personal use.