All toolsFree tool

Subnet / CIDR Calculator

Enter an IPv4 address and prefix to get the network, broadcast, usable host range and mask.

About this tool

Type an IPv4 address with a prefix length — for example 10.20.30.40/22 — and the calculator returns the network address, the usable host range, the broadcast address, the subnet mask in dotted-decimal form, the wildcard mask, the total number of addresses and the number of usable hosts. Results update as you type, and the whole calculation runs in your browser.

It removes the binary arithmetic from routine work: carving a VPC or VLAN out of a larger block, checking whether two proposed subnets overlap, sizing a range before a DHCP scope is built, or converting a mask into the wildcard form a router expects. Getting a prefix wrong by one bit is easy on a whiteboard and expensive to discover after the change window has closed. If you are turning the result into firewall rules, the Cisco ACL analyzer will parse them back for review.

How to use it

Enter any address inside the range — it need not be the network address — then read the table:

  • Network address — the first address in the block, used in routing tables and ACL entries.
  • Usable host range — the addresses you can assign to interfaces.
  • Subnet and wildcard mask — the same boundary written for host configuration and for router syntax.
  • Total addresses and usable hosts — check these against your growth estimate before committing the prefix.

Common questions

Does anything I type get sent to a server?

No. The whole calculation is plain JavaScript running in your browser. Nothing is uploaded, logged or transmitted, so it is safe to use with internal addressing plans.

Why do /31 and /32 prefixes behave differently?

A /32 is a single host route and a /31 is a two-address point-to-point link under RFC 3021, where both addresses are usable. For /30 and larger the first address is the network and the last is the broadcast, so usable hosts equal total addresses minus two.

What is the wildcard mask used for?

It is the bitwise inverse of the subnet mask. Cisco IOS access lists, OSPF network statements and route maps take a wildcard rather than a subnet mask, so a /24 is written as 0.0.0.255 instead of 255.255.255.0.

Need help with networking and server setup?

Talk to a senior engineer about your environment.

Contact Us