How to Use SECTIONPAGES and NUMPAGES Field Codes in Microsoft Word for Custom Page Numbering

When preparing multi-section documents in Microsoft Word—such as corporate annual reports, academic dissertations, legal briefs, and technical proposals—documents typically require distinct structural divisions. Front matter (cover pages, executive summaries, and tables of contents) usually omit page numbers or utilise lowercase Roman numerals, while main chapters restart numbering at Arabic numeral 1.

However, when authors insert the common “Page X of Y” page number format, Microsoft Word frequently displays incorrect total counts (such as “Page 1 of 65” on the final page of a 15-page chapter). This error occurs because Word inserts the NUMPAGES field code by default, which tallies the total pages across the entire document rather than the active section. Understanding the distinction between NUMPAGES and SECTIONPAGES resolves this formatting discrepancy.

Understanding NUMPAGES vs SECTIONPAGES Field Codes

Microsoft Word calculates dynamic page counts using internal XML field instructions:

  • NUMPAGES: Returns the total aggregate page count across the entire document, regardless of section breaks. If your document spans 80 pages total, NUMPAGES always evaluates to 80.
  • SECTIONPAGES: Returns the total page count contained strictly within the current section boundaries. If Section 2 spans 12 pages, SECTIONPAGES evaluates to 12.
  • PAGE: Evaluates to the active sequential number of the current page.

Configuring Section Breaks and Decoupling Headers

Before implementing section-specific numbering, verify that your document sections are properly isolated:

  1. Place your text cursor at the end of your introductory front matter.
  2. Navigate to the Layout tab on the Word ribbon.
  3. Click Breaks and select Next Page under the Section Breaks grouping.
  4. Double-click the header or footer area in the new section to activate header editing tools.
  5. In the ribbon under the Header & Footer tab, click the Link to Previous button to deselect it. This decouples the footer so changes do not alter preceding sections.

Inserting the SECTIONPAGES Field Code Step-by-Step

To build a custom “Page X of Y” footer that displays page numbers relative to the current chapter:

  1. Click into your decoupled footer where you want the page number displayed.
  2. Type the word Page followed by a space.
  3. Press Ctrl + F9 on Windows (or Cmd + F9 on Mac) to insert a pair of special field brackets { }. (Note: Do not type curly brackets manually from the keyboard).
  4. Inside the brackets, type PAGE so it reads: { PAGE }.
  5. Type of followed by another space.
  6. Press Ctrl + F9 again to insert a second set of field brackets.
  7. Inside these brackets, type SECTIONPAGES so it reads: { SECTIONPAGES }.
  8. Your completed field instruction should appear as:
Page { PAGE } of { SECTIONPAGES }
  1. Select the text, right-click, and choose Update Field (or press F9). You can also press Alt + F9 to toggle between field codes and evaluated numbers.
  2. To ensure numbering begins at 1 in this section, go to Insert > Page Number > Format Page Numbers…, select Start at:, and set the value to 1.

Your document footer will now accurately reflect the exact page count of the active section, delivering publication-grade pagination across complex multi-part documents.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.