---
title: "Subnet Calculator - IPv4 ranges, splits, and host counts"
description: "Enter an IPv4 address and prefix length to get the network address, broadcast address, usable host range, and host count. CIDR, IP with a mask, and plain IP are supported, with subnet splitting and host-count sizing."
canonical_url: "https://web-toolbox.dev/en/tools/subnet-calculator"
meta:
  author: K
  "og:description": "Enter an IPv4 address and prefix length to get the network address, broadcast address, usable host range, and host count. CIDR, IP with a mask, and plain IP are supported, with subnet splitting and host-count sizing."
  "og:image": "https://web-toolbox.dev/og/en/tools/subnet-calculator-33701cfd.png"
  "og:image:alt": "Subnet Calculator"
  "og:image:height": "630"
  "og:image:width": "1200"
  "og:title": "Subnet Calculator - IPv4 ranges, splits, and host counts"
---

> Index of every page on this site: [llms.txt](https://web-toolbox.dev/llms.txt)

# **Subnet Calculator**

Calculate and split IPv4 subnets

## **IPv4 address and options**

**IPv4 address / CIDR**

Plain IP, CIDR, or IP with subnet mask. The initial value is a private 192.168.0.0/16 example.

**Prefix length**

**Required hosts**

Prefix from host count

Examples

Network addressPrivate (RFC 1918)Input: Host address

## **192.168.1.0/24**

Usable hosts: 254

## **Subnet details**

<dl>

<dt>Broadcast address</dt>
<dd>192.168.1.255</dd>

<dt>Usable host range</dt>
<dd>192.168.1.1 – 192.168.1.254</dd>

<dt>Hosts / total addresses 2 reserved addresses</dt>
<dd>254 / 256</dd>

<dt>Subnet mask /24</dt>
<dd>255.255.255.0</dd>

<dt>Wildcard mask Inverse mask for ACLs and OSPF</dt>
<dd>0.0.0.255</dd>

<dt>Address scope Block: 192.168.0.0/16</dt>
<dd>Private (RFC 1918)</dd></dl>

## **32-bit structure**

The first 24 bits are the network portion and the last 8 bits are the host portion.

Network Host

Octet 1**192**

**1****1****0****0****0****0****0****0**

Mask: 11111111

Octet 2**168**

**1****0****1****0****1****0****0****0**

Mask: 11111111

Octet 3**1**

**0****0****0****0****0****0****0****1**

Mask: 11111111

Octet 4**0**

**0****0****0****0****0****0****0****0**

Mask: 00000000

<dl>

<dt>Network address (binary)</dt>
<dd>11000000.10101000.00000001.00000000</dd>

<dt>Subnet mask (binary)</dt>
<dd>11111111.11111111.11111111.00000000</dd>

</dl>

## **Subnet split**

Splitting 192.168.1.0/24 into /26 creates 4 subnets

**Target prefix**

| **#** | **CIDR** | **Usable host range** | **Hosts** |
| --- | --- | --- | --- |
| 1 | **192.168.1.0/26** | 192.168.1.1 – 192.168.1.62 | 62 |
| 2 | **192.168.1.64/26** | 192.168.1.65 – 192.168.1.126 | 62 |
| 3 | **192.168.1.128/26** | 192.168.1.129 – 192.168.1.190 | 62 |
| 4 | **192.168.1.192/26** | 192.168.1.193 – 192.168.1.254 | 62 |

Showing 1–4 of 4

## What is Subnet Calculator?

Enter an IPv4 address and prefix length to calculate the network address, broadcast address, usable host range, and host count for the subnet.

For example, `192.168.1.10/24` gives the network address `192.168.1.0/24`, the usable host range `192.168.1.1`–`192.168.1.254`, and 254 usable hosts. You can also split a subnet or work backward from a required host count.

## How to Use

1. Enter an IPv4 address.
2. If you enter a plain IP address, choose a prefix length.

The result updates as you type. You can also size a prefix from a required host count.

## Input Formats

| **Format** | **Example** | **When to use** |
| --- | --- | --- |
| Plain IP | `192.168.1.10` | Choose a prefix length and calculate |
| CIDR | `192.168.1.10/24` | Paste CIDR notation directly |
| IP + subnet mask | `192.168.1.10 255.255.255.0` | Calculate from a subnet mask |

Prefix lengths range from 0 to 32. A subnet mask must be a contiguous bit mask such as `255.255.255.0`.

## How the Calculation Works

### Network and broadcast addresses

The network address has all host bits set to 0, and the broadcast address has all host bits set to 1.

### Usable hosts

For `/0` to `/30`, the usable host count excludes the network and broadcast addresses. A `/31` is treated as a point-to-point link with two usable addresses, and a `/32` as a single host.

### Input address role

The tool shows whether the input is the network address, the broadcast address, or a host address. A `/31` is shown as P2P endpoint A or B, and a `/32` as a single host.

### Address scope

The tool shows an address scope such as private, global, or loopback. The label is a guide based on the network address.

### 32-bit structure

The address is shown as 32 bits, with the network and host portions in different colors. The subnet mask bits are shown alongside it.

## Subnet Splitting

The current network can be divided evenly into a longer prefix. Splitting `192.168.1.0/24` into `/26` creates four `/26` subnets. Selecting a subnet recalculates the result for that range.

## Sizing from a Required Host Count

Enter the number of hosts you need to see a suggested prefix. For example, 50 hosts suggests `/26` (62 usable hosts), and 2 hosts suggests `/30` (2 usable hosts). For a general two-host subnet, the tool suggests `/30`; the point-to-point `/31` is not included in the suggestion.

## Use Cases

- Designing a small LAN or a segment for each office
- Checking subnet splits for VLANs or a cloud VPC
- Finding which network an existing IP address belongs to
- Checking a wildcard mask for ACLs or OSPF
- Learning how subnet masks map to prefix lengths

## Frequently Asked Questions

<details>

<summary>Can I calculate IPv6 addresses?</summary>



No. This tool supports IPv4 only. IPv6 uses a different address length and a different model for usable hosts.

</details>

<details>

<summary>My cloud provider reserves five addresses, but the host count does not match.</summary>



This tool uses the standard RFC calculation and reserves only the network and broadcast addresses. AWS, Azure, and other providers may reserve additional addresses. Check the provider's documentation when planning a real subnet.

</details>

<details>

<summary>Can I enter an address that is not the network address?</summary>



Yes. The tool calculates the subnet that contains the address and shows the network address and usable host range. It also shows the role of the input address.

</details>

## Things to Keep in Mind

- The usable host count is theoretical. Real networks may use addresses for routers or other reservations.

**How was your experience?**

Last updated: December 4, 2026

### **Related Tools**

- [<h4>**DNS Lookup**</h4>](https://web-toolbox.dev/en/tools/dns-lookup)
- [<h4>**IP Address Checker**</h4>](https://web-toolbox.dev/en/tools/ip-address-checker)
- [<h4>**Subdomain Lookup**</h4>](https://web-toolbox.dev/en/tools/subdomain-lookup)
- [<h4>**Age Calculator**</h4>](https://web-toolbox.dev/en/tools/age-calculator)
- [<h4>**Aspect Ratio Calculator**</h4>](https://web-toolbox.dev/en/tools/aspect-ratio-calculator)
- [<h4>**Business Day Calendar**</h4>](https://web-toolbox.dev/en/tools/business-calendar)
- [<h4>**Character Counter**</h4>](https://web-toolbox.dev/en/tools/character-counter)
- [<h4>**Color Contrast Checker**</h4>](https://web-toolbox.dev/en/tools/color-contrast-checker)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://web-toolbox.dev/en#website","@type":"WebSite","description":"アカウント登録不要で使える無料Web開発ツール80種類以上。JSON整形、Base64変換、カラーコード変換、QRコード生成などをブラウザ上で瞬時に実行。開発者の作業効率を大幅に向上させます。","inLanguage":"en-US","name":"Web ToolBox","url":"https://web-toolbox.dev/en","translationOfWork":{"@id":"https://web-toolbox.dev/#website"}},{"@id":"https://web-toolbox.dev/en/tools/subnet-calculator#webpage","@type":"WebPage","description":"Enter an IPv4 address and prefix length to get the network address, broadcast address, usable host range, and host count. CIDR, IP with a mask, and plain IP are supported, with subnet splitting and host-count sizing.","name":"Subnet Calculator - IPv4 ranges, splits, and host counts","url":"https://web-toolbox.dev/en/tools/subnet-calculator","breadcrumb":{"@id":"https://web-toolbox.dev/en/tools/subnet-calculator#breadcrumb"},"isPartOf":{"@id":"https://web-toolbox.dev/en#website"},"potentialAction":[{"@type":"ReadAction","target":["https://web-toolbox.dev/en/tools/subnet-calculator"]}]},{"@id":"https://web-toolbox.dev/en/tools/subnet-calculator#/schema/web-application/1","@type":"WebApplication","applicationCategory":"UtilityApplication","description":"Enter an IPv4 address and prefix length to get the network address, broadcast address, usable host range, and host count. CIDR, IP with a mask, and plain IP are supported, with subnet splitting and host-count sizing.","name":"Subnet Calculator - IPv4 ranges, splits, and host counts","operatingSystem":"Windows, macOS, Linux, Android, iOS"},{"@id":"https://web-toolbox.dev/en/tools/subnet-calculator#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://web-toolbox.dev/en","position":1},{"@type":"ListItem","name":"Network","item":"https://web-toolbox.dev/en/categories/network","position":2},{"@type":"ListItem","name":"Subnet Calculator","item":"https://web-toolbox.dev/en/tools/subnet-calculator","position":3}]}]}
```

## Sitemap

See the full [sitemap](https://web-toolbox.dev/sitemap.md) for all pages.
