---
title: "IP Subnet Calculator - IPv4 & IPv6 CIDR & Netmask | WebPixie"
description: "Free IPv4 and IPv6 subnet calculator. Get network and broadcast addresses, host ranges, subnet and wildcard masks, CIDR, and split networks into subnets."
canonical: "https://webpixie.io/free-tools/ip-subnet-calculator"
source_path: "/free-tools/ip-subnet-calculator"
lang: "en"
generated_by: "scripts/generate-md.mjs"
---

1.  [Home](/index.md)
2.  [Free Tools](/free-tools.md)
3.  IP Subnet Calculator

# IP Subnet Calculator

Calculate network and broadcast addresses, host ranges, subnet and wildcard masks, and split a network into subnets. Works for IPv4 and IPv6, entirely in your browser.

## What is a subnet?

A subnet is a range of IP addresses defined by a network prefix. The prefix length, written after a slash in CIDR notation such as /24, says how many leading bits identify the network. The remaining bits identify hosts inside it. This calculator takes an address and a prefix or netmask, then derives the network address, broadcast address, usable host range, and the masks involved. Everything runs locally in your browser, so no address you enter ever leaves your device.

## How to read the results

-   **Network address** The first address in the range, identifying the subnet itself.
-   **Broadcast address** The last IPv4 address in the range, used to reach every host at once. IPv6 has no broadcast, so the calculator shows the last address instead.
-   **Usable host range** The addresses you can assign to devices. IPv4 subnets reserve the network and broadcast addresses, except for /31 and /32.
-   **Subnet mask** and **wildcard mask** Two ways of expressing the prefix. The wildcard mask is the inverse of the subnet mask and appears often in access control lists.
-   **Binary breakdown** Shows exactly where the network portion ends and the host portion begins, which makes subnetting easier to reason about.

## Splitting a network into subnets

You can divide a network three ways: into a target number of subnets, by the number of hosts each subnet must hold, or by a new prefix length. The calculator picks the smallest prefix that satisfies your request and lists each resulting subnet with its host range. Large IPv6 splits are capped in the table for performance, and you can export the visible rows to CSV.

## IPv4 address classes

Before CIDR, IPv4 space was split into fixed classes by the leading bits of the address. Classful ranges still explain the default masks and the address blocks reserved for multicast and future use.

| Class | Address range | Default mask | CIDR | Use |
| --- | --- | --- | --- | --- |
| A | 0.0.0.0 – 127.255.255.255 | 255.0.0.0 | /8 | Large networks |
| B | 128.0.0.0 – 191.255.255.255 | 255.255.0.0 | /16 | Medium networks |
| C | 192.0.0.0 – 223.255.255.255 | 255.255.255.0 | /24 | Small networks |
| D | 224.0.0.0 – 239.255.255.255 | — | — | Multicast |
| E | 240.0.0.0 – 255.255.255.255 | — | — | Reserved / experimental |

## Common IPv6 prefixes

-   **/32** Typical regional allocation (RIR to ISP)
-   **/48** Common site allocation
-   **/56** Smaller site / home allocation
-   **/64** Single subnet (standard LAN)
-   **/127** Point-to-point link (RFC 6164)
-   **/128** Single host

Once your addressing is planned, keep an eye on the services running on it with [uptime monitoring](/features/uptime-monitoring.md).

## Monitor your whole site with WebPixie

WebPixie brings uptime, SSL, DNS, domain, and site health monitoring into a single dashboard, then alerts your team when something needs attention. See how it fits your stack.

[Explore WebPixie features](/features.md)

### Frequently asked questions

Common questions about subnetting, CIDR, and host ranges.

### What is a /24 subnet?

A **/24 subnet** uses a `255.255.255.0` mask and contains **256 IP addresses**, of which **254 are usable** for hosts. The /24 means the first 24 bits are the network portion, leaving 8 bits for hosts, and two addresses are reserved (the network address and the broadcast address). Nearby sizes scale by powers of two:

-   `/23` doubles the block to **512 addresses**
-   `/24` holds **256 addresses**
-   `/25` halves it to **128 addresses**

A /24 is a common size for a home or small office LAN, such as `192.168.1.0/24`. The calculator above shows the exact network, broadcast, and host range for any address and prefix you enter.

### How do I calculate the number of usable hosts in a subnet?

The usable host count is **2 to the power of the host bits, minus 2** for IPv4. Host bits equal **32 minus the prefix length**, so a `/26` leaves 6 host bits, giving `2^6 = 64` total addresses and **62 usable**. The two subtracted addresses are the **network address**, which names the subnet, and the **broadcast address**, which reaches every host at once. Two prefixes are exceptions:

-   `/31` provides 2 addresses for point-to-point links, with no broadcast
-   `/32` describes a single host

IPv6 keeps the same `2^(host bits)` math but does not reserve a network or broadcast address, so every address in the prefix can be assigned.

### What are private IP address ranges?

**Private IP ranges** are blocks reserved for internal networks that are not routed on the public internet. **RFC 1918** defines three for IPv4:

-   **`10.0.0.0/8`** for large networks
-   **`172.16.0.0/12`** for medium networks
-   **`192.168.0.0/16`** for home and small office routers

Devices on these ranges reach the internet through **NAT**, which translates the private address into a public one. IPv6 has an equivalent called **unique local addresses** in the `fd00::/8` range. Paste any private range into the calculator above to see how many addresses it holds and how to divide it into smaller subnets.

### How many /24 subnets are in a /16?

A **/16 contains 256 subnets of size /24**, because the prefix grows by 8 bits and `2^8` is 256. Each extra prefix bit doubles the number of subnets and halves their size:

-   a /16 splits into **2** /17s
-   then **4** /18s
-   and so on, up to **256** /24s

The general rule is **2 raised to the difference** between the two prefix lengths. A /16 holds **65,536 addresses** in total, and each /24 inside it holds 256. To see every block at once, enter a network above and use the split option by new prefix length, then export the list to CSV.

### What is the difference between a subnet mask and a wildcard mask?

A **subnet mask** marks the network bits with ones, and a **wildcard mask** is its exact inverse, marking the host bits with ones. For a /24:

-   subnet mask: **`255.255.255.0`**
-   wildcard mask: **`0.0.0.255`**

You use the subnet mask to configure an interface or define a network, and the wildcard mask when you write **access control lists** or **OSPF** statements that match a range. For example, an ACL line referencing `192.168.1.0 0.0.0.255` matches the whole /24. The calculator above shows both masks for any prefix so you can copy the exact value your configuration expects.

### How is IPv6 subnetting different from IPv4?

IPv6 subnetting follows the same prefix logic as IPv4 but differs in three practical ways:

-   **No broadcast address:** nothing is reserved and every address can be assigned; IPv6 uses multicast instead
-   **/64 is the standard** size for a single network, far larger than any IPv4 subnet
-   **Hexadecimal notation** with colons rather than dotted decimal

The calculator above reflects this by showing the first and last address of an IPv6 prefix instead of network and broadcast labels. Because IPv6 ranges can be enormous, very large splits are capped in the results table for performance, while the address math stays exact.

### How do I split a network into smaller subnets?

**Splitting a network** means borrowing host bits to create several smaller subnets from one larger block. Borrow 2 bits from a /24 and you get **four /26 subnets** of 62 usable hosts each. **VLSM** (variable length subnet masking) lets you mix sizes, giving a busy segment a /25 and a small one a /28 from the same parent. The calculator above can divide a network three ways:

-   by a **target number of subnets**
-   by the **hosts each subnet** must hold
-   by a **new prefix length**

It then lists each block with its host range so you can assign them directly.

### Is this subnet calculator free and private?

**Yes.** The calculator is free and runs **entirely in your browser**, so no address you enter is sent to a server and nothing is stored. The math happens locally on your device, and you can share a result by copying the page link, which encodes your inputs in the URL. The tool needs no account or sign-up. Once your addressing is planned and the hosts are live, you can watch the services running on them with WebPixie [uptime monitoring](/features/uptime-monitoring.md), and review the free plan and paid tiers on the [pricing page](/pricing.md).

Want to see the records published for a host on your network? Use the [DNS Lookup tool](/free-tools/dns-lookup.md) to query A, AAAA, and 20+ other DNS record types.

## Source Attribution

This file is automatically generated by WebPixie AI and summarizes publicly available content from WebPixie pages.
Authoritative details should always be verified from the original URLs.
