Math Solver
Free online math tools
Search
🌐
Network Math

IP Subnet Calculator

Solve for wildcard masks, network IP addresses, broadcast addresses, and usable host ranges for IPv4 subnets.

Preparing IP Subnet Calculator
Please wait ...
Input
Enter your IPv4 address and select the subnet mask (using CIDR prefix or decimal format) below to resolve network ranges.
Input summary
Your calculator summary shows here.

A Guide to IP Subnetting and Network Divisions

IP subnetting is the process of dividing a single physical IP network into smaller, logical sub-networks (known as subnets). In network engineering and IT management, splitting a network is essential for controlling traffic congestion, optimizing routing paths, enhancing security protocols, and conserving public IP address ranges. Calculating subnet boundaries requires converting decimal IP addresses into binary form, applying mask logic, and translating results back.

How Subnet Math Works

An IPv4 address consists of 32 bits divided into four 8-bit octets. A subnet mask (like 255.255.255.0 or a CIDR /24 prefix) tells the computer which bits represent the network address and which bits represent individual host devices.

The network address is found by performing a bitwise logical AND operation between the IP address and the subnet mask in binary. To check bitwise binary math directly, check out our base-2 binary bits solver.

The broadcast address (used to send messages to all devices in the subnet) is found by setting all host bits to 1. The remaining values between the network address and broadcast address represent the usable host range. For checking IP formats in hexadecimal addresses, check our base-16 hexadecimal codes helper.

Why Subnetting is Essential

  • Conserving IP Addresses: Subnetting divides large blocks of IP addresses into custom-sized pockets, reducing empty unused addresses.
  • Traffic Management: Grouping devices into subnets isolates local broadcast traffic, preventing network-wide slowdowns, which you can verify alongside our standard daily math helper.
  • Enhanced Security: IT administrators isolate sensitive servers (like payroll systems) in separate subnets, restricting unauthorized guest access.
  • CIDR Comparisons: Calculating host limits across subnets uses exponents, which you can scale using our rounding decimals and digits tool.

The Usable Host Formula

To find the number of usable hosts in a subnet, we use the formula: Usable Hosts = 2^h - 2, where h represents the number of host bits (32 minus the CIDR prefix).

We subtract 2 because the first address in the block is reserved for the network address, and the last address is reserved for the broadcast address. For example, a /24 subnet has 8 host bits, yielding 2^8 - 2 = 256 - 2 = 254 usable host IP addresses. Our online tool computes these values instantly.

Example of Home Subnetting

Suppose you set up a home router with an IP address of 192.168.1.100 and a subnet mask of 255.255.255.0 (/24 prefix).

The calculator performs the binary AND operation. For a /24 mask, the first 24 bits (the first three octets: 192.168.1) represent the network, and the last octet (100) represents the host. The network address is 192.168.1.0. The broadcast address is 192.168.1.255. The usable host range includes all IPs between 192.168.1.1 and 192.168.1.254, supporting up to 254 devices. This example shows how subnetting divides local networks cleanly.