Word tasks · Page numbers
Add Page X of Y numbering in a Word footer
'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.
- 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.
- Type the words, not the numbers. Type
Pageand a space, leave a gap for the first field, then typeofand leave a gap for the second. The numbers themselves are inserted as fields in the next steps — never typed as digits. - 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.
- Insert the
NumPagesfield. Put the cursor in the second gap, open Quick Parts > Field again, chooseNumPages, and select OK. The total page count appears, and the footer now reads, for example, 'Page 1 of 12'. - 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.
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.
- 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. - 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.
- 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.
- 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.
- 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
NumPagesfigure on screen, the on-screen field had not refreshed — the preview figure is the one to trust. - Mind sections that restart numbering. If your document restarts page numbering in a later section, Page shows the restarted number while
NumPagesstill 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
- Every page footer reads 'Page X of Y', with X different on each page and Y equal to the document's true page count.
- Both numbers are fields — they shade gray when clicked, and Alt+F9 shows { PAGE } and {
NUMPAGES}. - No page carries typed digits pretending to be a page number.
- Print Preview confirms the same total the footer shows.
When it goes wrong
- Every page shows the same number. The number was typed as text, not inserted as a field. Delete it and insert the Page field with Quick Parts > Field as above.
- The footer literally shows { PAGE } in print. Field codes are being displayed and printed. Press Alt+F9 to switch back to field results before printing.
- The total is wrong after deleting pages. The
NumPagesfield has not refreshed. Update it with F9 in the footer, and confirm in Print Preview. - The first page should not show numbering. That is the Different First Page setting, covered by the general page numbers guide — turn it on in the Header & Footer tab and leave the first-page footer empty; the fields on the remaining pages are unaffected.
Related document tasks
-
Add page numbers to a Google Slides or Word handout printout
“Turn to page 4” only works if the paper in everyone's hands is numbered — and handouts are where numbering quietly goes missing, because a slide number and a handout page number are two different things.
-
Add an appendix that restarts its own numbering in Word
Add an appendix in Word with its own numbering: a section break to fence it off, lettered appendix headings (Appendix A, B, C) on their own multilevel list, and page numbers that restart at A-1 with the footer unlinked from the body.
-
Add page numbers, headers and footers in Word with a different first page
Word: page numbers, header and footer text, and a clean first page with Different First Page and Start at 0.
-
Restart footnote numbering on each page in Word
Restart footnote numbering on each page in Word: open the Footnote and Endnote dialog from the References tab, set numbering to restart on each page, apply it to the whole document, and fix sections that keep their own numbering.
Sources
- Microsoft Support, Add page numbers to a header or footer in Word — adding page numbers in a footer and the Page X of Y gallery styles.
- Microsoft Support, Field codes: Page field — what the PAGE field inserts and how it reports the current page number.
- Microsoft Support, Field codes:
NumPagesfield — what theNUMPAGESfield inserts and how it counts the total pages in the document.