Subnet Overview
{{ summary.network }} / {{ summary.prefix }}
{{ summary.netmask }} Netmask {{ summary.wildcard }} Wildcard {{ summary.usableHosts }} Usable Hosts
# Subnet Address Range of Addresses Hosts Split / Join
Field Value Copy
{{ row.key }} {{ row.value }}

        
{{ subnetsCSV }}

Introduction:

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.

Technical Details:

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.

M = ¬ 232p 1 N = aM W = ¬M B = NW Htotal = 232p Husable = if p<31, Htotal2; if p=31,2; if p=32,1
Symbols and units
Symbol Meaning Unit/Datatype Source
aIP addressIPv4 dotted‑quadInput
pPrefix lengthInteger 0–32Input
MNetmask32‑bit integerDerived
WWildcard mask32‑bit integerDerived
NNetwork addressIPv4 dotted‑quadDerived
BBroadcast addressIPv4 dotted‑quadDerived
HtotalTotal addressesCountDerived
HusableUsable hostsCountDerived
FirstFirst usable hostIPv4 dotted‑quadDerived
LastLast usable hostIPv4 dotted‑quadDerived
Worked example. Address a = 10.0.0.0, prefix p = 24:
M = 255.255.255.0 N = 10.0.0.0 W = 0.0.0.255 B = 10.0.0.255 Htotal = 256 Husable = 254
Interpretation: first usable host is 10.0.0.1 and last usable host is 10.0.0.254.
Validation rules extracted from implementation
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 and output formats
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.

Assumptions & limitations

  • IPv4 only; IPv6 addressing is not supported.
  • Octets must be integers from 0 to 255.
  • Prefix length must be an integer from 0 to 32.
  • Subnets split into equal halves only; custom sizes are not available.
  • Joins require adjacent siblings with equal prefix length.
  • For prefixes 31 and 32, first and last host are not applicable.
  • Arithmetic uses 32‑bit unsigned values for masks and ranges.
  • Heads‑up Structural validity does not confirm live routing or reachability.

Edge cases & error sources

  • Octet values outside 0–255 yield no results.
  • Non‑numeric characters in the address cause rejection.
  • Leading or trailing spaces can invalidate parsing.
  • Prefix 0 yields a single /0 network with very large ranges.
  • Prefixes 31 and 32 change usable host rules to 2 and 1.
  • Attempting to join non‑adjacent slices is ignored.
  • Clipboard permission denial prevents copy feedback.
  • Download blockers or sandboxed iframes can prevent saving.
  • Very deep splitting can reduce readability on small screens.
  • Browser extensions that rewrite URLs can break split encoding.

Step‑by‑Step Guide:

IPv4 subnet planning with ranges and usable host counts.

  1. Enter an IPv4 address a.b.c.d.
  2. Select a prefix length /p from 0 to 32.
  3. Review network, broadcast, first and last hosts, and usable counts.
  4. Click a colored bar to split; use Shift while clicking to join siblings.
  5. Switch to JSON or CSV to copy or download the current table.

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.

FAQ:

Is my data stored?

No. All computation and exports are created locally in your browser. Nothing is sent to a server.

Clipboard and downloads require user permission.
How accurate are host counts?

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.

Which formats are accepted?

IPv4 dotted‑quad addresses and integer prefixes from 0 to 32. Hex or IPv6 forms are not accepted.

Can I use it offline?

Yes. Once loaded, calculations run without network access. Copy and download features depend on browser support.

Does it cost anything?

No licensing terms are indicated in this package.

How do I split a /24 into /26?

Pick /24 and split twice. You will get four /26 subnets with 62 usable hosts each.

What does “N/A” for first or last host mean?

For /31 and /32 there is no traditional host range, so those fields are shown as not applicable.

Are IPv6 subnets supported?

No. The calculator focuses on IPv4.

Troubleshooting:

  • No output shown: check each octet is 0 to 255.
  • Unexpected host count: confirm the prefix and remember p ≤ 30 reserves two addresses.
  • Cannot copy: grant Clipboard permission or use the fallback manually.
  • Download fails: allow downloads or try a different browser profile.
  • Join ignored: only adjacent equal‑prefix slices can be joined.
  • URL too long: reduce split depth or clear the split encoding.

Advanced Tips:

  • Tip Keep workspaces consistent by favoring the same base address across similar sites.
  • Tip Compare usable hosts first, then confirm broadcast boundaries do not cross VLANs.
  • Tip Use /31 for point to point links when both ends understand that convention.
  • Tip Encode preferred layouts in the URL to revisit the same split plan later.
  • Tip Keep child subnets contiguous so join operations remain available.
  • Tip When ranges feel tight, try one step larger prefix and recheck headroom.

Glossary:

IPv4
Internet Protocol version 4 with 32‑bit addresses.
CIDR
Classless routing notation using a prefix length.
Prefix length
Number of leading bits that identify the network.
Netmask
Bitmask with prefix bits set to 1.
Wildcard mask
Bitwise complement of the netmask.
Broadcast address
Highest address in the subnet range.
Usable hosts
Total addresses minus reserved ones.
Host range
Lowest and highest usable host addresses.