Network and Host ID Calculator
Separate prefix and host portions.
Network and Host ID Calculator: inputs and results
Enter an IP address, CIDR prefix, or range. Then check its first and last address below.
Calculated Boundaries & ParametersReady
Key Capabilities
- •100% Client-Side: Zero telemetry or server latency.
- •RFC Compliant: Exact 32-bit and 128-bit integer precision.
- •Quick Copy: Instant access to CIDR, mask, and range bounds.
- •Cross-Platform: Works on desktop, tablet, and mobile browsers.
Related IPv4 Subnetting & RangeAll Tools
IPv4 Range Calculator
Find address boundaries from a prefix.
IPv4 Subnet Calculator
Calculate subnet details from address and mask.
Network Address Calculator
Find the subnet’s network address.
IPv4 Broadcast Address Calculator
Find broadcast addresses where applicable.
First and Last Address Calculator
Identify a range’s endpoints.
Usable IPv4 Host Range Calculator
Apply the selected subnet-use rules.
How Network and Host ID Calculator Works?
This tool works by splitting the 32 address bits at the prefix boundary: the left part is the network ID and the right part is the host ID.
Enter address and prefix
Type
10.45.200.17/20.Extract the network ID
address AND maskgives10.45.192.0.Extract the host ID
address AND wildcardgives0.0.8.17.Convert the host ID to a number
The host ID
0.0.8.17equals 8 × 256 + 17 = host number 2,065 inside the subnet.
Network and Host ID Calculator Formula
The formula is Network ID = IP AND Mask, and Host ID = IP AND Wildcard. Adding both values back together returns the original address.
Network ID
NID = IP AND MaskLeft p bits.
Host ID
HID = IP AND (NOT Mask)Right 32 − p bits.
Rebuild rule
IP = NID + HIDThe 2 parts never overlap, so plain addition works.
Host number
n = int(HID)The position of the host inside the subnet, starting at 0.
Worked example: 10.45.200.17/20
Mask = 255.255.240.0 Wildcard = 0.0.15.255 200 = 1100 1000 → network part 1100 = 192, host part 1000 = 8 Network ID = 10.45.192.0 Host ID = 0.0.8.17 Host no. = 8 × 256 + 17 = 2,065
Network and Host ID Calculator Conversion Table
The table splits 10.45.200.17 into its network ID and host ID at 12 prefix lengths.
| Prefix | Network ID | Host ID | Host Number |
|---|---|---|---|
| /8 | 10.0.0.0 | 0.45.200.17 | 3,000,337 |
| /12 | 10.32.0.0 | 0.13.200.17 | 903,185 |
| /16 | 10.45.0.0 | 0.0.200.17 | 51,217 |
| /18 | 10.45.192.0 | 0.0.8.17 | 2,065 |
| /20 | 10.45.192.0 | 0.0.8.17 | 2,065 |
| /21 | 10.45.200.0 | 0.0.0.17 | 17 |
| /22 | 10.45.200.0 | 0.0.0.17 | 17 |
| /23 | 10.45.200.0 | 0.0.0.17 | 17 |
| /24 | 10.45.200.0 | 0.0.0.17 | 17 |
| /26 | 10.45.200.0 | 0.0.0.17 | 17 |
| /28 | 10.45.200.16 | 0.0.0.1 | 1 |
| /30 | 10.45.200.16 | 0.0.0.1 | 1 |
What is Network and Host ID Calculator?
The Network and Host ID Calculator is a tool that separates an IPv4 address into the network ID, which names the subnet, and the host ID, which names the device inside that subnet.
Every IPv4 address carries both IDs. The prefix length decides where the split falls. At /24, the address 10.45.200.17 has the network ID 10.45.200.0 and host ID 17. At /16, the same address has the network ID 10.45.0.0 and host ID 51,217.
The host ID shows the position of a device inside its subnet. That position helps with addressing conventions, such as reserving host IDs 1 to 10 for gateways and network appliances.
What are the uses of Network and Host ID Calculator?
There are 4 main uses of the Network and Host ID Calculator, including addressing conventions, subnet teaching, and inventory mapping.
Applying addressing conventions
Policies such as "gateways use host ID 1" are checked by reading the host ID of each gateway.
Teaching the address structure
Students see the same address produce different network and host IDs as the prefix changes.
Mapping devices to subnets
Inventory tools use the network ID to place each device in its subnet record.
Translating between subnets
Renumbering projects keep the host ID and replace the network ID, so
10.1.1.25moves to10.2.1.25.