To show a live “Page 1 of X” count in a Microsoft Word header, insert a PAGE field for the current page and a NUMPAGES field for the document’s total pages, with the words “Page” and “of” between them. In Word for Microsoft 365 on Windows, open the header, use Insert > Quick Parts > Field for each field, then close the header. Word updates the numbers as the document changes.
What You’ll Need
- A Word document open in the Microsoft Word desktop app. The instructions below use Word for Microsoft 365 on Windows; the Mac path is noted where it differs.
- A document with at least one page. The total-page field can still be inserted in a shorter document, and will update when you add pages.
- Editing access to the document. If it is read-only or protected, you may need to save an editable copy or ask for permission before changing the header.
Step-by-Step
- Save a copy if you want to preserve the original layout. Adding a header is usually easy to undo, but a copy is useful when the file has existing section breaks, different headers, or carefully formatted page numbering. Click in the document body and check that you are editing the intended file.
- Open the header. Double-click near the top margin of a page, above the main body text. Alternatively, go to Insert > Header > Edit Header. Word switches to header-editing mode and displays the Header & Footer tab. If a header already contains a logo or text, click where you want the page count to appear rather than replacing the existing content.
- Place the insertion point where the count should begin. Click in the header at the desired position. To put the count on the right, use the header’s existing right-aligned area or press Tab to move through the header alignment positions; avoid adding a long string of spaces, which may shift when margins or fonts change. If the header contains other content, add a space or a new line as needed to separate the count from it.
- Type the label before the page number. Enter Page including the trailing space. This is ordinary text, so you can later change it to another label or format it with the Home tab. Do not type the number 1 itself: a typed number will stay the same on every page.
- Insert the current-page field. On Windows, choose Insert > Quick Parts > Field. In the Field dialog, select Page from the field names and click OK. Word inserts the current page number at the cursor. The value may display as 1 on the first page, but on later pages the same field displays 2, 3, and so on. If the Quick Parts command is not visible, widen the Word window or open the Insert tab’s Text group.
- Add the separator and total-page field. After the inserted page number, type of with a space on both sides. Then choose Insert > Quick Parts > Field again, select NumPages, and click OK. The header now contains two live fields and ordinary text. For example, on the first page of a 12-page document it reads Page 1 of 12; on page 4 it reads Page 4 of 12.
- Check the field result and formatting. The field results may have a gray background when selected or when Word highlights fields; that shading normally does not print. Select the two numbers and adjust the font, size, bolding, or color from Home if needed. Avoid selecting surrounding header text unless you also want to format it.
- Close header editing and inspect multiple pages. Click Header & Footer > Close Header and Footer, or double-click in the body. Check the first page and at least one later page using Print Layout. If the count is not immediately current, click the field result in the header and press F9 to update it; on some Mac keyboards, use Fn+F9. You can also open Print preview, which often refreshes page fields.
Mac difference: Word for Mac uses the same PAGE and NUMPAGES field names, but the command for inserting a field is generally Insert > Field, rather than Insert > Quick Parts > Field. Choose Page for the current page and NumPages for the document total in the Field dialog. Ribbon labels can vary slightly with the Word version and window width. Word for the web can add basic page numbers, but for inserting or troubleshooting these specific fields, open the document in the desktop app.
Common Mistakes
- Typing a number instead of inserting a field. If you type “Page 1 of 12” as plain text, every page will show the same numbers, even after the document changes. Insert the Page and NumPages fields from the Field dialog so Word can calculate the values.
- Choosing the wrong total-pages field. NUMPAGES counts pages in the entire document. SECTIONPAGES counts pages in the current section, so it will show a different total in a document with multiple sections. Use NumPages for a document-wide “of X” count unless you specifically want a per-section count.
- Assuming the first page must always show a count. If Different First Page is enabled on the Header & Footer tab, the first page has its own header. A count inserted into the regular header may appear on page 2 onward but not on page 1. Add the fields to the first-page header too, or turn off that setting if you do not need a distinct first page.
- Overwriting an existing header. Choosing a complete header design from the Header gallery can replace existing content or alter its layout. When a header already has text, a logo, or a design, edit it directly and place the fields where they belong.
- Expecting NUMPAGES to count only the pages after a title page. NUMPAGES normally includes all pages in the Word document, including a cover page. If the cover page is excluded from numbering, the displayed page number and total may not match the convention you expect without adjusting sections and numbering.
- Using spaces to position the count. Repeated spaces are unreliable because the text can move with font, margin, or printer changes. Use the header’s alignment controls or tab positions to place the count consistently.
Tips
Keep “Page” and “of” as normal text. Only the changing values need to be fields. This makes the header easy to read and lets you customize the wording without changing the calculations. For a compact style, you could use “1 of 12” by omitting the word Page, or “Page 1 / 12” by typing a slash in place of “of.”
Use a built-in layout when you want a quick result. In Word for Windows, choose Insert > Page Number > Top of Page and look for a gallery layout that shows a page number and total, often described as a “Page X of Y” style. The exact thumbnails and labels may differ by version. Selecting a gallery design can replace or reformat header content, so the two-field method is preferable when you want to add the count to an existing custom header.
Know what happens in sections. A document can have separate headers for different sections. If the count should appear throughout, inspect the header on pages after each section break. The Link to Previous control on the Header & Footer tab determines whether a section shares its header with the preceding one; if it is off, add the fields to that section’s header separately. Linking headers can also carry other header content across sections, so check the layout before changing it.
Keep the field results current before sharing. Word usually recalculates page fields when it repaginates or prepares a document for printing, but a field can temporarily show an old value after edits. Update the individual fields with F9, then check Print preview or export a PDF and review the first, middle, and last pages. This confirms that the total is correct and the header has not wrapped onto an extra line.
Consider the reading context. A small, unobtrusive count is useful in reports and handouts, but it should remain legible in print. Check that the header is not too close to the page edge and that the text contrasts with the paper. If the document uses a large title or logo, put the count on a separate line or use a right-aligned header position to avoid crowding.
Troubleshooting
The fields display as code, such as { PAGE }. Word may be showing field codes instead of their results. Right-click the field and choose Toggle Field Codes, or select the field and press Shift+F9 on Windows. If the whole document is showing codes, press Alt+F9 to switch field-code display; on Mac, the keyboard combination can depend on the keyboard settings, so use the context menu if needed.
The total is blank or does not change. Click the displayed total in the header and press F9, then check Print preview. Confirm that you inserted NumPages, not plain text or a different field. If pages were added inside a complex document, wait for Word to repaginate or save and reopen the file, then check the result again.
Page 1 has no count, but later pages do. Edit page 1’s header and inspect the Different First Page option on the Header & Footer tab. When it is selected, page 1 uses a separate header. Add the two fields to that first-page header, or clear the option if the same header should appear throughout. Also check that the first-page header is not simply outside the visible area because of the top margin.
The count restarts or the header disappears after a section break. Click in the affected page’s header and check whether Link to Previous is selected. A new section can have an independent header and page-number settings. If page numbering restarts at 1, open Page Number > Format Page Numbers from the Header & Footer tab and review whether numbering is set to continue from the previous section or start at a chosen number. Remember that NUMPAGES still counts the whole document even if PAGE restarts within a section.
The number is cut off or wraps onto another line. Widen the available header area by moving the count, reducing its font size slightly, or adjusting the header layout. Check the page margins under Layout > Margins, and avoid positioning the count with multiple spaces. If the header already has a logo or other text, a right-aligned tab position or a two-column table with hidden borders can help separate the elements.
The commands are missing in Word for the web. Some field and header controls available in desktop Word are not exposed in the web app. Open the file in the Word desktop app using the app switcher or the document’s editing menu, insert the fields there, and save. Afterward, you can usually view the resulting header in the browser, though more advanced layout changes may still require desktop Word.
Frequently Asked Questions
Does “Page 1 of X” update automatically when I add pages?
Yes. PAGE reflects the current page, and NUMPAGES reflects the document’s total page count. Word normally refreshes these fields as it repaginates; if a value looks stale, select it and press F9 or check Print preview.
Will this show the correct number on every page?
Yes, provided the fields are in the header used by those pages. A different first-page header or unlinked section header may need its own copy of the fields. Check pages on both sides of section breaks as well as page 1.
Can I show “1 of 10” without the word Page?
Yes. Insert the Page field, type a space, “of,” and another space, then insert NumPages. The wording between the fields is ordinary text, so you can use “/” or another separator instead.
What is the difference between NUMPAGES and SECTIONPAGES?
NUMPAGES returns the number of pages in the entire document. SECTIONPAGES returns the number of pages in the section containing the field. For a document-wide total, use NumPages; use SectionPages only when the count should restart or apply separately within each section.
Can I start the displayed page number at 1 after a cover page?
Yes. Put a section break after the cover, open the next section’s header, and use Page Number > Format Page Numbers to set its numbering to start at 1. If the sections use different headers, insert the fields in the header for the numbered section. NUMPAGES still counts the cover page as part of the complete document total.
Will the page count appear in a PDF?
It should, once the fields have updated and the header is visible in Word. Before sending the PDF, use Print preview or export the file to PDF and check a few pages, including the first and last. This catches stale field results and header differences between sections.
Related
- Compound Interest Spreadsheet: Build One in Excel Easily
- Power Query: Select Columns and Keep the Fields You Need
- Google Sheets Data Cleaning: Tools, Steps, and Tips
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- How to Insert a Line in Word Under Text: Easy MethodsTo put a line under text in Word, select the text and press Ctrl+U on Windows or Command+U…
- Circular References in Excel: How to Find and Trace ThemTo see circular references in Excel for Microsoft 365 on Windows, open the Formulas tab, choose Error Checking…
- How to Insert a First-Line Indent in Microsoft WordTo insert a first-line indent in Word, click in a paragraph or select several paragraphs, then open Home…
- Insert Row in Excel: Keyboard Shortcut and OptionsIn Excel for Microsoft 365 on Windows, select the row where the new one should go, then press…
- How to Present PowerPoint and See Your Speaker NotesTo present a PowerPoint while keeping your notes visible, connect a second display, set Windows to extend the…
- Dynamic Sort in Google Sheets: Formulas That UpdateTo create a dynamic sort in Google Sheets, enter a SORT formula in an empty area, such as…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.