Database & SQL
SQL Pagination Calculator
Enter a page number and page size to get the exact LIMIT/OFFSET
for your query, plus a ready-to-run statement and a plain-English explanation of the
boundary cases. Everything runs in your browser.
Page & size
liveUsed for the page count and last-page checks. Leave blank if you only need LIMIT/OFFSET.
Result
liveBoundary cases
liveHow it works
Offset pagination skips a fixed number of rows and then takes the page size:
OFFSET = (page − 1) × page size. Page numbers are 1-based, so
page 1 starts at OFFSET 0. Without an ORDER BY the database
is free to return rows in any order, which can duplicate or skip rows between pages.
All calculations happen in your browser and nothing is sent anywhere.