Skip to content
DocumentTaskLab

Word tasks · Page numbers

Add Page X of Y numbering in a Word footer

Written November 23, 2026

'Page 3 of 12' tells a reader where they are and whether a printed copy is complete — but only if both numbers update as the document grows. This guide builds that exact form in a footer from Word's Page and NumPages fields, so the current page and the total are always calculated, never typed.

Build Page X of Y in the footer

This guide covers only the 'Page X of Y' form. For plain page numbers, a different first page, or general header and footer work, use the broader page numbers guide on this site instead. Microsoft's help on adding page numbers to a header or footer covers the gallery route; the steps below build the same result field by field, which is what makes the 'of Y' part reliable.

  1. Open the footer. Double-click in the footer area at the bottom of any page. The Header & Footer tab appears. Click where you want the numbering to sit — or press Tab to move to the center or right tab stop in the footer.
  2. Type the words, not the numbers. Type Page and a space, leave a gap for the first field, then type of and leave a gap for the second. The numbers themselves are inserted as fields in the next steps — never typed as digits.
  3. Insert the Page field. Put the cursor in the first gap. While the footer is open, go to the Insert tab and choose Quick Parts > Field. In the Field dialog, choose Page from the field names list and select OK. The current page number appears.
  4. Insert the NumPages field. Put the cursor in the second gap, open Quick Parts > Field again, choose NumPages, and select OK. The total page count appears, and the footer now reads, for example, 'Page 1 of 12'.
  5. Close the footer and look at two pages. Choose Close Header and Footer, then scroll: page 2 should read 'Page 2 of 12', with only the first number changed. That difference is the proof both numbers are fields.
Why typed numbers fail

A footer is repeated identically on every page. If you type 'Page 1 of 12' as plain text, every page says 'Page 1 of 12' — and when the document grows to 14 pages, even that total is wrong. Fields are the only version that works: Page reports the page it sits on, and NumPages counts the whole document, so each printed page states its own position.

See the field codes behind the numbers

Each number is a field, and seeing its code once makes every later fix easier.

  1. Toggle the field codes. Click a number in the footer and press Alt+F9. The footer now shows { PAGE } and { NUMPAGES } instead of digits. Press Alt+F9 again to return to the results.
  2. Recognize a field by its shading. Clicking a field result shades it gray on screen (the shading never prints). Plain typed digits do not shade — that is the quickest test when a footer someone else built shows the same number on every page: it was typed, and the fix is to delete the digits and insert real fields.
  3. Format the numbers through the field. To make the numbers bold, select the whole 'Page X of Y' line in the footer and apply bold normally — formatting applies to the field results and survives updates. To change the number style itself (for example to Roman numerals), use Insert > Page Number > Format Page Numbers rather than editing the code by hand.

Update the fields and check the total

Fields in a footer refresh when Word repaginates, and they update at printing — but after heavy editing it is worth forcing an update and reading the result once before you share the file.

  1. Force an update. Open the footer, select the numbering line, and press F9. Or select the whole document with Ctrl+A in the body and press F9, then check the footer again.
  2. Confirm the total in Print Preview. Choose File > Print and look at the preview: it shows the true page count and each page's own number. If the preview total differs from the NumPages figure on screen, the on-screen field had not refreshed — the preview figure is the one to trust.
  3. Mind sections that restart numbering. If your document restarts page numbering in a later section, Page shows the restarted number while NumPages still counts every page in the document — so 'Page 1 of 12' can legitimately appear twice in one file. That is correct field behavior, not an error; if readers find it confusing, the fix is a numbering decision (continuous numbering, or separate documents), not a field edit.

End state

When it goes wrong

Related document tasks

Sources