IP

Computer & IT

Subnet Calculator

Calculate the subnet mask, network address, broadcast address, total address count, and traditional usable host count from four IPv4 octets and a prefix. The binary address-strip visual shows exactly which bits are fixed and which remain available to hosts.

Network address-
Broadcast address-
Subnet mask-
Total addresses-
Traditional usable host addresses-

Decision view

IPv4 network and host-bit strip

IPv4 network and host-bit stripThe CIDR prefix fixes leading network bits while the remaining host bits establish block boundaries and address capacity.
Exact scenario comparisonCIDR prefix length changes while all other entered assumptions remain constant.
CIDR prefix lengthNetwork addressBroadcast addressSubnet maskTotal addressesTraditional usable host addresses

How to use Subnet Calculator

  1. Enter each IPv4 octet and the CIDR prefix supplied by the network plan.
  2. Verify that the resulting network and broadcast boundaries match the intended routing or VLAN scope.
  3. Apply platform-specific rules for gateways, DHCP pools, reserved addresses, point-to-point links, and cloud subnets.

Calculator guide

Understanding Subnet Calculator

An IPv4 CIDR prefix divides a 32-bit address into a network portion and a host portion. The address alone is not enough: the same four octets can belong to very different networks under /16, /24, or /28.

32-bit boundary Prefix length fixes network bits and leaves host bits.
Aligned block Network and broadcast are derived boundaries.
Capacity convention Usable host rules depend on the environment.
Operational context Routing and allocation policy remain separate.

Calculation method

How the calculation works

Convert four IPv4 octets and a CIDR prefix into the network address, broadcast address, subnet mask, total addresses, and traditional host capacity. Convert the four octets to one 32-bit integer, apply the prefix mask to obtain the network, set all host bits to one for broadcast, and calculate total addresses as two raised to the host-bit count.

Address-plan audit

Check a subnet before assigning hosts

Correct arithmetic does not prevent a bad network design.

Overlap Compare the entire network-to-broadcast range with every existing allocation.
Gateway Reserve the chosen router or virtual gateway address.
DHCP Keep static infrastructure outside dynamic lease pools.
Growth Allow capacity for clients, appliances, failover, and future services.

Worked situations

Practical examples

  • 192.168.10.73/24 belongs to network 192.168.10.0 with broadcast 192.168.10.255.
  • A /24 contains 256 total addresses and traditionally 254 usable host addresses.
  • Changing only the prefix to /28 places the address inside a 16-address block.

Better inputs

Useful tips

  • Allocate address space on prefix boundaries to avoid overlapping subnets.
  • Reserve infrastructure addresses before defining a DHCP pool.
  • Document route, VLAN, security-zone, and site ownership alongside each CIDR block.

Before relying on the result

Limitations and common mistakes

  • The displayed usable count follows the traditional network-and-broadcast subtraction.
  • Cloud platforms, /31 point-to-point links, /32 host routes, DHCP policy, and provider reservations can use addresses differently.
  • IPv6, routing behavior, NAT, firewall policy, and address conflict detection are excluded.

Reference

Key terms

CIDR prefix
Number of leading IPv4 bits assigned to the network portion.
Subnet mask
Dotted-decimal form of the prefix's fixed network bits.
Network address
First address in the aligned subnet block.
Broadcast address
Last address in a traditional IPv4 subnet block.

Important note

Calculated from the entered technical values using the displayed model. Validate topology, workloads, capacity, security, redundancy, and observed performance before implementation.

Frequently asked questions

Why is the entered host address changed to the network address?

All host bits are cleared to identify the containing subnet boundary.

Does every subnet lose two addresses?

Not universally; /31, /32, and cloud-provider conventions can differ.

Can this check overlapping CIDR blocks?

No. Compare each calculated range against the complete address plan.

Does the calculator configure a router?

No. It provides address arithmetic only.