%3C/text%3E%3C/svg%3E">
💻
💻 Tech & IT

Virtual Address → Page Number & Offset Calculator

Results update as you type.

Your numbers

Understanding the virtual address page number and offset calculator — concept and principle

With paged virtual memory, the processor splits every virtual address into a page number, which the page table translates to a physical frame, and an offset, which is copied unchanged into the physical address. This calculator performs that split for a hexadecimal address and a page size in KiB. It is used in operating-systems courses, when reading crash dumps and debugger output, and when reasoning about TLBs and huge pages.

Splitting a virtual address into page and offsetWith 4 KiB pages the low 12 bits of 0x7FFE1234 are the offset 0x234 (byte 564), and the rest, 0x7FFE1, is the virtual page number.An address = which page + where on it0x7FFE1234page number 0x7FFE1upper 20 bitsoffset 0x234low 12 bitspage0x7FFE14,096 bytesbyte 564 on the page0x234 = 5644,096 = 2¹²→ 12 offset bits= last 3 hex digitspage = address ÷ 4,096 · offset = address mod 4,096
Like a book: the page number says which page, the offset says where on that page.

How it is calculated

Page size is entered in KiB and multiplied by 1,024. The address is read as hexadecimal (with or without "0x") and handled as an arbitrary-precision integer, so 64-bit addresses work. Results are shown in hexadecimal.

The principle

Page sizes are powers of two, so dividing by the page size is the same as shifting right by k bits, and the remainder is just the lowest k bits. With 4 KiB pages, k = 12: the low 12 bits (three hex digits) form the offset and the remaining high bits form the page number. Every byte within a page shares the same page number, so a single page-table entry can map a whole page.

Worked example

  1. Address 0x7FFE1234, page size 4 KiB = 4,096 bytes = 2^12.
  2. Offset bits: log₂(4,096) = 12.
  3. Page number: 0x7FFE1234 ÷ 4,096 = 2,147,357,236 ÷ 4,096 = 524,257 remainder 564; 524,257 = 0x7FFE1.
  4. Offset: 564 = 0x234.
  5. Check: drop the last three hex digits for the page and keep them for the offset.

How to read the result

The offset tells you where in the page the byte lies and stays the same after translation. The page number is the index the MMU looks up. With 2 MiB huge pages the offset grows to 21 bits, so far fewer entries cover the same memory.

Common mistakes

Keep in mind: This shows the arithmetic split only. Real x86-64 and ARM systems divide the page number further into several page-table levels and check permission bits, and those details depend on the architecture and kernel.

Frequently asked questions

How many pages fit in a 32-bit address space with 4 KiB pages?

2^32 ÷ 2^12 = 2^20, about one million pages.

How is the physical address formed?

Physical address = frame number × page size + offset; the offset is unchanged.

Why does x86-64 use 4 KiB pages?

It is the base page size of the architecture; 2 MiB and 1 GiB pages are also supported for large mappings.

Sources: A. Silberschatz, P. B. Galvin, G. Gagne, Operating System Concepts, Wiley (chapter on main memory and paging) · Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3A (paging)

Checked 8 Nov 2026. Standard formulas and RFC/IEEE definitions, computed locally in your browser — nothing you type is sent anywhere.

💻 All tech & IT tools →🌍 Calculators by country →