Plan offset and cursor-style pagination for an endpoint: total pages, last offset, and the next cursor.
Total Records — Value for total records. Provide accurate numbers for a reliable Total Pages. Example: 1000.
Page Size — Value for page size. Provide accurate numbers for a reliable Total Pages. Example: 100.
Total Pages
10
Total Pages — Calculated outcome. Derived from your inputs via the displayed formula; use to plan.
Last Offset (0-based)
900
Last Offset (0-based) — Calculated outcome. Derived from your inputs via the displayed formula; use to plan.
Offset for Next Page
1,000
Offset for Next Page — Calculated outcome. Derived from your inputs via the displayed formula; use to plan.
Full Pages
10
Full Pages — Calculated outcome. Derived from your inputs via the displayed formula; use to plan.
Remaining on Last Page
0
Remaining on Last Page — Calculated outcome. Derived from your inputs via the displayed formula; use to plan.
What this means
The number of pages is the record count divided by the page size, rounded up (0 pages when there are no records). For offset pagination, the last page starts at (totalPages − 1) × pageSize; for cursor-style clients, the next cursor after the last page is simply the record count on full pages plus whatever remains, i...
Offset and cursor pagination are the two common ways to page through a REST collection. This planner turns a total record count and a page size into the shape of that pagination: how many pages exist, where offset-based clients can jump to, and what the next cursor should be.
Formula
totalPages = ⌈totalRecords ÷ pageSize⌉; cursor = lastOffset + pageSize = totalPages × pageSize
Worked examples
FAQ
Offset or cursor — which should I use?
Offset paging is simple and good for small, stable datasets. Cursor (opaque) paging behaves better as data changes and performs more consistently at scale. This tool reports both so you can plan either contract.
What does nextCursor mean after the last page?
It is the offset a client would request to reach page 2, 3, … or the value after the last record. When totalPages is 0 or you are already at the end, it marks the sentinel that ends the loop.