IPv4 planning

Subnet Calculator: CIDR, IP Range and Hosts

Calculate network address, broadcast address, subnet mask, wildcard mask, host counts, and usable IP range from an IPv4 address and CIDR prefix.

Fast subnet mathGet network details without manual binary conversion.
Subnet summaryPreview consecutive networks for more-specific prefixes.
ACL helperWildcard mask output is ready for Cisco access lists.

Calculate IPv4 subnet details

Enter an IPv4 address with optional CIDR, or choose a prefix from the list.

IPv4

Subnetting reminders

Network and broadcast

The network address identifies the subnet. The broadcast address is the last address in normal IPv4 subnets.

Usable hosts

Most subnets reserve two addresses, but /31 and /32 networks are special cases used for point-to-point or host routes.

Wildcard masks

Wildcard masks are inverse subnet masks and are commonly used in Cisco ACLs and routing protocol network statements.

How to Use the Subnet Calculator

Enter an IPv4 address and prefix length when you need to confirm the network boundary before configuring a router, firewall, switch SVI, DHCP scope, VPN selector, or ACL. The calculator helps you avoid common subnetting mistakes such as using the network address as a host, placing a gateway outside the subnet, or writing a wildcard mask that matches more addresses than intended.

For design work, calculate the smallest prefix that gives enough usable host addresses while leaving room for growth. For troubleshooting, compare the calculated range with the device configuration. If two hosts cannot communicate, confirm that their IP addresses, masks, default gateways, and VLAN placement all agree with the subnet range shown here.

A common workflow is to calculate the subnet first, copy the network address into the routing or firewall plan, then use the first usable IP for the default gateway and reserve the final usable addresses for infrastructure such as firewalls, load balancers, or monitoring nodes. In WAN designs, verify whether the provider expects a /30, /31, or routed block before assigning addresses.

Common use cases

Plan VLAN gateways, DHCP pools, point-to-point links, firewall zones, static routes, and routing protocol network statements.

Configuration checks

Validate the subnet mask, first usable host, last usable host, broadcast address, and wildcard mask before pasting commands into a device.

Related IP Tools

Use these related tools when the subnet calculation becomes part of a larger troubleshooting or documentation task.

Verify the Result Before Using It in a Configuration

The calculator should support a subnetting decision, not replace review. Confirm that the entered address belongs to the intended block, the prefix supplies enough usable addresses, and the proposed gateway and DHCP range do not use the network or broadcast address. For VLSM plans, compare each calculated range with the previous and next subnet to prevent overlap.

Document the result in CIDR notation and include the gateway, DHCP range, reserved addresses, VLAN, and purpose. A consistent record makes later firewall rules, route summaries, monitoring alerts, and troubleshooting much less ambiguous.

For example, 192.0.2.70/27 belongs to network 192.0.2.64. The block contains 32 addresses, the conventional usable range is 192.0.2.65 through 192.0.2.94, and the broadcast address is 192.0.2.95. The wildcard mask is 0.0.0.31. Those values can be used to review an SVI, DHCP scope, ACL or routing protocol statement.

Operational Uses for Subnet Results

Special prefixes need separate interpretation. A /31 can be used on compatible point-to-point links without traditional network and broadcast addresses, while a /32 identifies one host route or loopback. Continue with the subnetting tutorial, wildcard mask calculator, and OSPF labs to apply the calculated networks.