Data & Requests · LOCAL TOOL
Pagination Boundary Planner
Calculate a one-based page's zero-based offset, limit, record range, neighbor pages, and final-page size from an explicit total and page size.
No API call
Your input
LOCALResult
Run the tool to see a result.
Your result will appear here. Input is not saved.
WHY THIS TOOL EXISTS
A focused job, not a black box.
Empty datasets, exact page-size multiples, and requests beyond the final page have distinct results. The output gives concrete examples for reviewing an API or pagination UI contract.
How to use it
- Enter a stable total record count and positive page size.
- Choose a one-based requested page.
- Review zero-based offset and the actual first and last record positions.
TRY A WORKING EXAMPLE
Start with known input.
Load this sample into the workspace, run the tool, and compare the result shown below.
Show sample input
{
"total": "103",
"size": "20",
"page": "6"
}Expected sample result from the local tool
Page 6 contains 3 record(s).
{
"total": 103,
"pageSize": 20,
"page": 6,
"pageCount": 6,
"offset": 100,
"limit": 20,
"inRange": true,
"returnedCount": 3,
"firstRecord": 101,
"lastRecord": 103,
"previousPage": 5,
"nextPage": null,
"lastPageCount": 3
}One-based pages, zero-based offset. Assumes a stable total and ordering; cursor pagination and concurrent data changes are not modeled.
LIMITS AND INTERPRETATION
What the result cannot tell you.
Whole numbers within JavaScript's safe integer range; page size at most 1000000. Assumes stable ordering and total. Cursor pagination and concurrent insertions/deletions are not simulated.
Inputs are processed in this page and are not written to local storage.