A CIDR calculator converts an IPv4 address and prefix into its network address, broadcast address, usable host range, subnet mask, wildcard mask, and host counts.

That information turns a bare IPv4 address plus a prefix such as /24 into a complete block plan. The Subnet Calculator also accepts a dotted subnet mask, allowing you to work from whichever format your configuration already uses. Its calculations run in your browser, and neither the entered address nor the query is sent away from your device.

cidr calculator
CIDR Calculator: IPv4 Network and Host Details

What a CIDR calculation resolves

CIDR notation divides an IPv4 address into network and host portions. The number after the slash identifies the leading network bits, while the remaining bits belong to the host portion. CIDR replaced the old fixed Class A, B, and C boundaries, so the prefix length—not the address class—determines the size of the block.

This calculator is scoped to IPv4 rather than IPv6. Enter the address without a slash in the address field, then choose the prefix or subnet-mask mode described below.

Result What it represents Practical use
Network address The first address in the block, with every host bit set to zero Defines the subnet boundary
Broadcast address The final address in the block, with every host bit set to one Defines the broadcast boundary
First and last usable host The outer host-assignable addresses under the applicable prefix rules Shows the usable range
Usable and total host counts The number of assignable hosts and the total addresses in the block Supports address-capacity planning
Subnet mask The network and host bit split expressed in four octets Identifies the correct mask for the prefix
Wildcard mask The bit-for-bit inverse of the subnet mask Supports address matching in ACLs and OSPF
IP class The address's legacy class label Provides context without replacing the CIDR prefix
RFC 1918 private status Whether the address belongs to a reserved private range Helps distinguish internal addressing from public addressing

The IP class is only a classification label. Once CIDR is in use, the selected prefix and corresponding mask are the values that determine the network boundary and host capacity.

Calculate an IPv4 block from an address

Use this workflow to inspect the block that contains a particular IPv4 address:

  1. Type the IPv4 address. Enter a value such as 192.168.1.10 in the address field.
  2. Choose the prefix or subnet-mask input. Select a CIDR prefix such as /24, or switch to Subnet mask mode and enter a dotted value such as 255.255.255.0.
  3. Read the results table. Review the network and broadcast addresses, first and last usable hosts, usable and total counts, subnet and wildcard masks, IP class, and RFC 1918 status.
  4. Account for the prefix type. Confirm that the host count and boundary fields match your network plan, paying particular attention to the special rules for /31 and /32.

The results update instantly when the input changes. Every calculation uses 32-bit unsigned bitwise math in the browser, which also keeps the entered network data on your device.

Read the network and host boundaries

The network address is the first address in the selected block, while the broadcast address is the last. For conventional prefixes through /30, those two addresses are reserved and cannot be assigned to devices. The usable-host count therefore removes both from the total.

  • Network address: Use it as the starting point of the subnet, not as an additional host assignment.
  • Broadcast address: Use it as the upper boundary of the block and for identifying the subnet's broadcast scope.
  • First and last usable host: These fields show the endpoints of the assignable range under the relevant prefix rule.
  • Total and usable counts: Compare these figures with expected capacity. A larger prefix leaves fewer host bits and produces a smaller block.

An address entered into the tool identifies a position within the selected block. The returned network and broadcast fields then describe the boundaries of the entire subnet rather than only that one address.

Calculate host capacity from the prefix

For IPv4 prefixes through /30, the general relationship is usable hosts = 2^(host bits) − 2. The subtraction accounts for the network and broadcast addresses.

Worked example: Enter 192.168.1.10 and choose /24:

  • Host bits = 32 − 24 = 8
  • Total addresses = 2^8 = 256
  • Usable hosts = 2^8 − 2 = 254

The calculator performs this calculation from the prefix and applies the corresponding network, broadcast, and usable-range rules automatically. For a manual cross-check, see the guide to calculating subnet block size.

Apply the special rules for /31 and /32

The standard subtraction formula does not apply to every CIDR prefix. The calculator handles both exceptional cases according to their IPv4 addressing rules.

Prefix Addressing model Usable-host result Typical use
Prefixes up to /30 Network and broadcast addresses are reserved 2^(host bits) − 2 General IPv4 subnets
/31 Both addresses are usable, with no separate network or broadcast address 2 Point-to-point links under RFC 3021
/32 The network, broadcast, and host are the same address 1 Loopbacks and single-host firewall rules

Under RFC 3021, a /31 is intended for IPv4 point-to-point links, so both addresses remain usable. A /32 represents one address and consequently reports one usable host. Use the calculator's result for these prefixes rather than forcing the ordinary formula onto them.

Use wildcard masks for address matching

The subnet mask expresses which bits identify the network, while the wildcard mask expresses the opposite matching rule. A wildcard bit set to one means that any value is accepted in that position; a zero means the value must match. This is why wildcard masks are used in Cisco access-control lists and OSPF network statements to match ranges of addresses.

Keep the two masks distinct. The subnet mask defines the subnet's network and host split. The wildcard mask is its bit-for-bit inverse and should be used only where the destination syntax expects wildcard matching, such as an ACL or OSPF configuration.

Check RFC 1918 private status

RFC 1918 reserves three IPv4 ranges for internal use: 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. These blocks are commonly used behind NAT and are not routed on the public Internet. The calculator reports whether the entered address falls within one of them, which is useful when deciding how an address should be exposed.

Private status is a classification, not a complete reachability or security check. It does not confirm that NAT, firewall rules, DNS, or service exposure are configured correctly. Treat the private-status field as one input to a broader deployment review.

Check the CIDR block before deployment

Before using the returned values, run through this short review:

  • Confirm that the input is the intended IPv4 address and that the selected prefix or mask represents the planned network.
  • Compare the total and usable counts with expected capacity, using the special results for /31 and /32.
  • Check the returned network and broadcast addresses against the intended block boundaries.
  • Use the wildcard mask only in an ACL, OSPF statement, or other context that calls for wildcard matching.
  • Review RFC 1918 status separately from decisions about routing, NAT, firewalls, and public exposure.

This review turns the calculator from a notation converter into a practical network-planning check: the same result set shows the boundaries, capacity, masks, address classification, and private-range status needed to review one IPv4 block.

If you're weighing options, How to Compare Common Network Ports List Lookup Methods covers this in detail.