# | Subnet Address | Range of Addresses | Hosts | Split / Join |
---|---|---|---|---|
{{ row.id }} | {{ row.cidr }} | {{ row.first }} – {{ row.last }} | {{ row.usable }} |
|
Field | Value | Copy |
---|---|---|
{{ row.key }} | {{ row.value }} |
{{ subnetsCSV }}
IPv4 subnets are contiguous blocks of addresses that share a prefix and describe how a network is partitioned. They support clear routing decisions and tidy address plans so hosts stay grouped and broadcasts stay contained. A visual IPv4 subnet calculator helps you check ranges and plan splits without mental arithmetic.
Provide any IPv4 address and choose a prefix length, then read the network, broadcast, and host ranges. You can split a subnet into equal children and join adjacent slices to explore alternative layouts. Results include usable host counts so you can compare options quickly.
A common task is carving a larger block into smaller workgroups. For example 10.0.0.0 with prefix 24 yields 10.0.0.1 to 10.0.0.254 and 254 usable hosts. Splitting once produces two child networks with prefix 25 and 126 usable hosts each, which fits teams or racks nicely.
Be mindful that point to point links often use prefix 31 and single device entries use prefix 32, so the first and last host fields become not applicable. Valid structure alone does not prove an active network, so use test addresses when demonstrating.
For consistent planning use the same base address, compare usable hosts across candidates, and repeat small changes step by step. Reuse the layouts you prefer as a starting point next time.
Internet Protocol version 4 (IPv4) uses a 32‑bit address split into a network prefix and a host part. Classless Inter‑Domain Routing (CIDR) denotes the prefix length as /p
where 0 ≤ p ≤ 32
. A subnet is the set of addresses sharing the same prefix of length p
at a chosen base address.
From an address a and prefix p, a netmask M is formed with the first p bits set to 1 and the remaining bits set to 0. The network address N equals a bitwise AND M. The wildcard mask W equals bitwise NOT of M, and the broadcast address B equals N bitwise OR W.
The total address count is Htotal = 2^(32 − p)
. Usable host count excludes the network and broadcast addresses for ordinary subnets: Husable = H_total − 2
. For p = 31
there are two usable addresses, and for p = 32
there is one.
Comparisons and calculations here apply to IPv4 only. Counts assume contiguous allocation and the traditional reservation of network and broadcast addresses when p ≤ 30
.
Symbol | Meaning | Unit/Datatype | Source |
---|---|---|---|
a | IP address | IPv4 dotted‑quad | Input |
p | Prefix length | Integer 0–32 | Input |
M | Netmask | 32‑bit integer | Derived |
W | Wildcard mask | 32‑bit integer | Derived |
N | Network address | IPv4 dotted‑quad | Derived |
B | Broadcast address | IPv4 dotted‑quad | Derived |
Htotal | Total addresses | Count | Derived |
Husable | Usable hosts | Count | Derived |
First | First usable host | IPv4 dotted‑quad | Derived |
Last | Last usable host | IPv4 dotted‑quad | Derived |
a = 10.0.0.0
, prefix p = 24
:
10.0.0.1
and last usable host is 10.0.0.254
.
Field | Type | Min | Max | Step/Pattern | Error Text | Placeholder |
---|---|---|---|---|---|---|
IP address | IPv4 dotted‑quad | 0.0.0.0 | 255.255.255.255 | Each octet 0–255 | None shown; results hidden when invalid | 192.168.0.0 |
Prefix length | Integer | 0 | 32 | Step 1 | None | /0 to /32 |
Split layout (URL) | Dot‑separated prefixes | Root prefix | 32 | Filtered to range | Ignored when out of range | Not shown |
Input | Accepted Families | Output | Encoding/Precision | Rounding |
---|---|---|---|---|
Address and prefix | IPv4 dotted‑quad; integer prefix 0–32 | Subnet table; info rows | Exact integers and dotted‑quads | None |
JSON export | — | Array of subnet records | UTF‑8; indent 2 spaces | None |
CSV export | — | ID, Subnet, CIDR, First, Last, UsableHosts | Comma‑separated; quoted when needed | None |
Networking & storage behavior. Processing is browser‑based with no external requests. Copy uses the Clipboard API with a fallback. Downloads use in‑memory blobs and temporary object URLs. Split layouts encode as a compact list in the page URL.
Performance. Subnet generation, split, and join operations are linear in the number of leaf subnets. Visualization builds a small hierarchical tree sized by subnet address counts.
Security considerations. Inputs are sanitized to integer octets per position. No secrets are required. Clipboard and download operations follow user permissions; identical inputs always yield identical outputs.
Privacy & compliance. No data is transmitted or stored server‑side. Exports are created locally.
IPv4 subnet planning with ranges and usable host counts.
Example. Enter 10.0.0.0
and pick /24
, then split once to view two /25
subnets.
You now have clear ranges and host counts for fast planning.
No. All computation and exports are created locally in your browser. Nothing is sent to a server.
Clipboard and downloads require user permission.Counts follow IPv4 rules: total is 2^(32 − p)
, usable excludes network and broadcast for p ≤ 30
, with special handling for p = 31
and p = 32
.
IPv4 dotted‑quad addresses and integer prefixes from 0 to 32. Hex or IPv6 forms are not accepted.
Yes. Once loaded, calculations run without network access. Copy and download features depend on browser support.
No licensing terms are indicated in this package.
Pick /24
and split twice. You will get four /26
subnets with 62 usable hosts each.
For /31
and /32
there is no traditional host range, so those fields are shown as not applicable.
No. The calculator focuses on IPv4.
p ≤ 30
reserves two addresses./31
for point to point links when both ends understand that convention.