Subnet IP range calculator
Enter an IPv4 address and a prefix or mask to see its address range.
Subnet split and binary details
Subnets within the parent network
| Network | Broadcast | First host | Last host | Host count (arithmetic) | Total addresses |
|---|
Sources
Section 3.1 describes CIDR notation with prefix lengths from 0 to 32, the corresponding masks and block address counts as powers of 2; section 5.1 requires contiguous masks. These concepts correspond to this calculator’s prefix and mask inputs and Total addresses row.
RFC 3021 — Using 31-Bit Prefixes on IPv4 Point-to-Point Links
Sections 2.1 and 2.2 describe /31 on point-to-point links: both addresses serve as host addresses, with no directed broadcast address. This is the assumption used for this calculator’s /31 display; other link types are outside the document’s scope.
RFC 1122 — Requirements for Internet Hosts -- Communication Layers
Section 3.2.1.3 excludes all-zero and all-one host fields from ordinary host addressing, corresponding to network and directed broadcast addresses. This calculator’s arithmetic Host address range for /0 through /30 excludes both ends on that basis; applying this arithmetic to /0 is this calculator’s convention. RFC 3021 updates the /31 case.
Subnet calculation rules
An IPv4 address has four decimal octets from 0 to 255; this calculator’s strict input format rejects leading zeros in multi-digit octets to avoid ambiguous notation.
Use a CIDR prefix from 0 to 32 or a mask with consecutive one bits followed by zero bits; only the selected input method defines the subnet.
/31 assumes a point-to-point link (RFC 3021): both addresses are endpoints (hosts), with no directed broadcast address. /32 is one address; this calculator marks Broadcast as not applicable as an arithmetic display convention with 0 host bits.
Reserved, private and multicast ranges and cloud-provider restrictions are not subtracted; the result does not guarantee assignment or connectivity.
For parent prefix p and split prefix q, p ≤ q ≤ 32 and 2^(q−p) ≤ 256; larger tables are rejected rather than truncated.
The input IP is shown separately from the network address, with the bit boundary and an example; no network probing is performed.
Calculation formula
Let p be the prefix and IP the unsigned integer value of the input IPv4 address. This calculator uses these arithmetic rules: Address count = 2^(32−p); start = floor(IP/address count)×address count; end = start+address count−1; mask = 2^32−address count; wildcard = address count−1. For /0 through /30, this calculator’s arithmetic host range excludes start and end.
Frequently asked questions
- How are CIDR and a subnet mask related?
- Both define the network bits; the CIDR prefix counts the leading one bits in a continuous mask. Select the input method you want to use.
- Why does the host count differ from the total address count?
- For /0 through /30, the arithmetic host count excludes the first and last addresses. For /26, the total is 64 and the host count is 62; reserved ranges are not subtracted.
- How are /31 and /32 handled?
- For /31, this calculator assumes a point-to-point link (RFC 3021): both addresses are endpoints (hosts), with no directed broadcast address. /32 is one address (a host route). With 0 host bits, this calculator’s arithmetic display marks Broadcast as not applicable.
- What does splitting a subnet do?
- It lists only subnets inside the parent network and marks the row containing the input IP. The split prefix cannot be smaller than the parent prefix, and the table cannot exceed 256 rows.
- Does this check availability or support IPv6?
- No. This tool performs IPv4 arithmetic only; it does not check assignment or connectivity, query WHOIS, configure devices or calculate IPv6 ranges.
Privacy on this page
Calculations run in your browser. The input IP, prefix or mask, input mode and split prefix are placed after # in the page address and are passed on when you share that address. semku does not send these calculation inputs or results to the server or save them in browser storage; reopening a shared address restores its inputs. The IP entered for calculation is separate from the connection IP recorded in access logs.
To understand how the page is used and to improve the service, this page sends semku’s own usage statistics and automatic error reports. They go only to the dedicated endpoint under semku.com/api/telemetry/v1/. They are not used for advertising or third-party tracking.
The usage statistics include stages of use (such as starting an operation or requesting a copy), the times they occur and fixed identifiers that distinguish the page and feature. They do not include the input IP, prefix, mask or split settings, the results or subnet table, or the text you copy. Inputs are not sent as hashes or as size categories either. The full URL and search terms are not sent.
Operations and sessions are distinguished by randomly generated identifiers. In the browser, these identifiers exist only in temporary memory and are not written to cookies or browser storage. No identification based on cookies or combined device characteristics is used.
Error reports contain the error type, code and time, and, where available, a registered program-source identifier with line and column numbers. The error message text and stack traces are not sent. Usage statistics and error reports also carry the site identifier, the deployment version and a random record identifier. For access records such as IP addresses, browser signals (User-Agent Client Hints), region and language, see the paragraph below.
The feedback form sends the rating you chose and the text you typed in the free-text field when you press the send button. The form also sends a random ID that distinguishes the submission, along with the page, site, deployment version and type of request. There are no fields for your name, email address or phone number, and your calculation inputs, results or subnet table are not attached automatically. Before sending your text, the widget removes leading and trailing whitespace and, if you selected a rating, adds [+1] or [-1] at the start; it makes no other changes to your text. After receipt, the collector standardizes line endings and removes leading and trailing whitespace. Please do not enter personal data, passwords, authentication keys or payment details.
To improve the service, we record the country and state/province-level region at the time of your visit (an estimate based on the connecting network), which site you came from including the page path, and one display-language setting announced by your browser (for example, en-US). Location is kept to country and region only; no city or precise position is recorded. When you use the service, connection records, including your IP address, are automatically generated and retained to maintain service security and identify abnormal access. Cloudflare is the data processor for this site. Collection of this item is enabled only after this notice is published; we do not collect it retrospectively for use before collection is enabled. Query strings such as search terms are not recorded, and neither is the full list of preferred languages or the raw request headers. Collection of this information is currently disabled and will only be enabled after this notice is published. If we enable collection, we will collect and use signals your browser reports about its type and version, along with an indication of whether automation tools are being used, to identify bots. These browser signals are estimates and do not conclusively identify your browser's type or version or whether automation tools are being used. We do not collect it retrospectively for use before collection is enabled. The raw User-Agent request header is not recorded. These records are per visit only and use no identifier that links one visit to another. Recording starts only with visits after this notice is published and is not applied retroactively to earlier visits. The region and the referring site have been recorded since 2026-09-20; the display language since 2026-09-24. Browser signals are not recorded yet.
Separately, when you visit the site, the hosting provider records your IP address, the time of the request and user-agent information about your browser and device in Cloudflare Pages’ standard access logs.
For details, see the privacy policy.
Calculations run in your browser without sending your calculation inputs or results to the server.