logo
search
Formatting Issues

How to Fix Incorrect Page X of Y Numbers in Word

Steve KSteve K Sep 27, 2026 869 views

Question details

The user needs to correct page numbers in a Word document where the current page number exceeds the total page count.

How to Fix Incorrect Page X of Y Numbers in Word
Product
Microsoft Word
Device & OS
not provided
Scenario
Working on a document with multiple sections where the total page count displays inaccurately, such as Page 38 of 38 followed by Page 39 of 38.
Observed behavior
Word displays incorrect total page counts due to faulty field codes or extraneous text hidden within the NUMPAGES field.
Before you start

Before adjusting field codes, click the Show/Hide ¶ icon on the Home tab to display formatting marks, making it easier to spot section breaks that might be affecting your page numbering.

Solution 1Recommended

Correct the NUMPAGES Field Code

Reveal and edit the hidden field codes in your document's footer to ensure the 'Page X of Y' formula is calculating accurately.

Microsoft Word relies on hidden background formulas called field codes to generate automatic page numbers. When a document undergoes heavy editing or contains multiple section breaks, these codes can break or accumulate extra text, causing logical errors like 'Page 39 of 38'.

1
Display Field Codes

Press 'Alt+F9' (or 'Fn+Alt+F9' on some computer keyboards) to toggle the display of field codes across your entire document.

2
Locate the Numbering Format

Scroll down to the footer (or header) where your page numbers are located to inspect the raw code.

3
Clean the Field Code

Verify that the text appears exactly as 'Page { PAGE } of { NUMPAGES }'. If you see additional characters, extra text, or strange calculations inside the braces for NUMPAGES, delete them.

4
Update All Fields

Press 'Ctrl+A' to select your entire document, then press 'F9' (or 'Fn+F9') to force Word to update all fields and recalculate the page numbers.

5
Hide Field Codes

Press 'Alt+F9' again to toggle the field codes off and view your corrected page numbers.

Correct the NUMPAGES Field Code
Document vs. Section Total Pages: If you want the total page count of a specific section rather than the entire document, replace '{ NUMPAGES }' with '{ SECTIONPAGES }'.

Handle Page Numbers Flawlessly with WPS Writer

WPS Writer offers an intuitive and highly visual interface for managing headers, footers, and complex page numbering without needing to manually edit underlying field codes.

  1. 1. Open Your Document in WPS: Launch WPS Writer and open your .docx document.
  2. 2. Access the Page Number Tool: Navigate to the 'Insert' tab and click on the 'Page Number' button.
  3. 3. Select the Page X of Y Style: Choose the predefined 'Page X of Y' style from the dropdown gallery. WPS automatically handles the field logic for you.
  4. 4. Save Your Changes: Double-click the main document body to close the footer, verify your numbering is correct, and save the file.
Easily insert perfectly formatted 'Page X of Y' numbering directly from the ribbon.Fully compatible with Microsoft Word document formats (.docx and .doc).Visual header and footer tools reduce formatting errors and section break confusion.A free, lightweight, and user-friendly alternative to Microsoft Office.
microsoft office alternative - wps office

Frequently Asked Questions

Why does my Word document say Page 2 of 1?

This usually happens when the total page count (the NUMPAGES field) has not refreshed automatically after you added a new page. You can easily fix this by selecting the entire document (Ctrl+A) and pressing F9 to update all fields.

How do I restart page numbering at 1 for a new section?

Double-click the header or footer to enter edit mode, highlight the page number, right-click and choose 'Format Page Numbers'. In the dialog box, select 'Start at' and enter 1 under the Page Numbering section.

What is the difference between NUMPAGES and SECTIONPAGES?

NUMPAGES calculates and displays the total number of pages in your entire document, regardless of sections. SECTIONPAGES only counts the total number of pages within the current document section.

Why aren't my field codes toggling when I press Alt+F9?

On many modern laptops, the function keys are tied to media controls by default. You may need to press Fn+Alt+F9 to trigger the standard F9 command, or adjust your computer's BIOS or keyboard settings to enable standard function keys.