How to set page numbers as "Page X of Y" in Word
The article explains how to create "Page X of Y" page numbering in Word by combining the PAGE and NUMPAGES fields, and covers how to handle common cases such as leaving the cover page uncounted and working with sections.
Key Points of This Article
- Page numbers should display "Page X of Y", which requires two fields: PAGE shows the current page, and NUMPAGES shows the total number of pages; the numbers must not be typed by hand.
- In the footer, type "第 ", insert the PAGE field, then type " 页 共 ", insert the NUMPAGES field, and finally add " 页".
- When the cover page is not numbered, the total page count will include one extra page; this can be corrected with a formula field such as {= {NUMPAGES} - 1}.
- When page numbers are numbered separately for sections or the table of contents, NUMPAGES counts the entire document; SECTIONPAGES or an adjusted starting page number should be used instead.
Many people insert page numbers in Word and find that they only show 1, 2, 3, rather than "Page 3 of 30." Theses, contracts, bidding documents, and internal reports often require this format, so readers can see at a glance where they are and how many pages remain. Word's built-in page numbering defaults to plain numerals only. To achieve "Page X of Y," you need to combine two fields yourself.
This article is written for students, office workers, and document editors who need this kind of page numbering. After reading it, you will be able to create "Page X of Y" in your document footer, and you will know how to handle cover pages that are not numbered and how to adjust when a document is divided into sections, so that the total page count no longer mismatches.
This kind of page numbering relies on two fields: PAGE, which displays the current page number, and NUMPAGES, which displays the total number of pages in the document. Typing the numbers manually won't change as the page count changes, so the page numbers will become wrong after you edit the content. The methods below are all based on fields; after adding or removing content, just press F9 to update them.
How do you do "Page X of Y"? The short answer
Combine text with the PAGE and NUMPAGES fields in the footer; for ordinary documents, follow this directly, and for documents with a cover page or sections, adjust as needed.
| Your situation | Recommended Practices | Cause |
|---|---|---|
| Standard document: number uniformly starting from the first page | Enter "Page " in the footer, insert PAGE, then enter " of ", insert NUMPAGES, and finally enter " pages" | Both fields update automatically with the page count, which saves effort. |
| The cover page does not display a page number, but the total page count excludes the cover. | Change the total page count to the formula field {= {NUMPAGES} - 1} | NUMPAGES counts the cover page too, so subtract 1 to match the body page count. |
| The main text starts from page 1; the table of contents or abstract before it is numbered separately. | Use SECTIONPAGES to count the pages in the current section, or set the starting page number. | NUMPAGES counts the entire document, so after sections are created the total displayed may not match the body text. |
| We need to repeat the same page number format in multiple places. | Set it up once in the footer, then reuse it for subsequent headers and footers or when creating new documents. | Domain structure is preserved in the template, reducing repetitive operations. |
| The document needs to be handed over to someone else for further editing. | Keep the domain, don't change the page numbers to hand-typed numbers | After the other party adds or deletes content, the page numbers can still update automatically. |
Before You Begin: Confirm These Points First
- Confirm whether the cover page should be unnumbered. Many theses and reports do not display a page number on the cover, while the table of contents or body may start from 1. When the cover is unnumbered, the number shown by PAGE may not match the total counted by NUMPAGES, so you need to determine this in advance.
- Check whether the document contains section breaks. Section breaks can change the starting value and counting method of page numbers. If the table of contents, abstract, and body each have their own page number format, you must check them section by section rather than changing only one place.
- Make sure your Word can display field codes. Page numbers are generated automatically by fields, and numbers shown with a gray background are not ordinary text. Before you start, you can click anywhere in the footer; if you see a gray shading, it is a field, which is normal.
- Prepare a preview that shows the total page count. After inserting page numbers, verify them using Print Preview or by paging through the document, and confirm that "of Y pages" matches the actual page count. Do not rely only on the numbers shown in editing view.
Steps to insert "Page X of Y" in Word
- Open the document, double-click at the bottom of the page to enter footer editing mode, or use the header and footer command in the Word menu to access the footer area.
- Place the cursor where you want the page number to appear, usually centered. Type "第 ", keeping one space after "第".
- Insert the PAGE field. On Windows, press Ctrl+F9 and a pair of curly braces { } will appear. Type PAGE between the braces, then press F9 to update it; the text inside the braces will change to the current page number, for example 1. On Mac, you can generate the field with fn+Command+F9.
- Move the cursor to the end of the field, and type "页 共 " with spaces on both sides so the numbers read more smoothly.
- Press Ctrl+F9 again, type NUMPAGES inside the braces, then press F9 to update; the displayed number is the total number of pages in the document.
- Move the cursor to the end, type "页", then close the header and footer editing and return to the body text.
- Press Ctrl+A to select the entire document, then press F9 to update all fields, making sure the page numbers and total page count on every page have been refreshed. Then use Print Preview to flip through a few pages and check the numbers.
If you need to check whether the field content is correct, you can press Alt+F9 (on a Mac, follow the shortcut shown in the menu) to toggle the display of field codes. In the normal state, you should be able to see the field names PAGE and NUMPAGES, then switch back to see the results.
Verify item by item after completion
| Inspection items | How do you look at it? | What should I do if I have a problem? |
|---|---|---|
| Is the current page number incrementing? | Turn to page 1, the middle page, and the last page; the page numbers should be 1, the middle number, and the last page number, respectively. | If the page numbers don't change, select all the footer content and press F9 to update; if it's still wrong, check whether plain text was accidentally inserted. |
| Is the total number of pages consistent with the actual count? | Count the total number of pages in the print preview and compare it with "Y pages in total." | If there is a cover page that is not counted in the page numbering, use {= {NUMPAGES} - 1} instead; after sectioning, use SECTIONPAGES to count the pages of the current section. |
| Is the spacing and punctuation correct? | Check whether there are extra or missing spaces in "第 X 页 共 Y 页". | Edit the text directly outside the field, without deleting the field's curly braces. |
| Do the cover and table of contents meet the requirements? | Check whether the first page displays a page number, and whether the page numbering on the table of contents page continues or is counted separately. | Set "Different first page" in Page Setup, or set an independent page number starting value for each section. |
| Does it update automatically after the content is modified? | Add a paragraph of text in the middle, then check whether the total page count has changed. | When the page numbers are still typed-in numbers, delete them and reinsert the PAGE and NUMPAGES fields. |
📊 Core Comparison
There are three common page numbering formats, each suited to different scenarios:
| Writing method | Method | Suitable situations |
|---|---|---|
| Pure numeric page numbers | Insert only the PAGE field, displaying 1, 2, 3 | A regular document that doesn't need a total page count; simple settings |
| "Page X of Y" | PAGE and NUMPAGES combination | For documents such as papers, contracts, and bid documents, where readers need to track progress, this is the main approach taken in this article. |
| Manual page numbering | Enter the number for each page directly | It is only suitable for short, fixed documents; any change to the content requires redoing everything, so it is not recommended for long documents. |
❓ Frequently Asked Questions (FAQ)
1. Page number displays "Page 1 of Error! ..." — what should I do?
This is usually because the NUMPAGES field was not updated correctly, or the field code is misspelled. First check whether the text inside the braces is actually NUMPAGES, then select the footer content and press F9 to update it. If the error still appears, delete the entire field and re-insert it with Ctrl+F9.
2. The cover page should have no page number, but the total page count should exclude the cover. How do I set this up?
In the total page count position, replace NUMPAGES with a formula field, in a form like {= {NUMPAGES} - 1}, then press F9 to update. This way the displayed total does not include the cover page in the count.
3. How to Display the Total Number of Body Pages When TOC and Body Page Numbers Are Counted Separately?
NUMPAGES counts the entire document, so after the document is divided into sections it is not suitable for showing the page count of the main body. The footer of the body section can instead use the SECTIONPAGES field, which counts the pages of the current section. Combined with the page number start value setting, this makes the body page numbers correspond to the total.
4. Why do the page numbers change when I edit, but look wrong when others open the file after I insert them?
This situation is usually caused by fields not being updated, or by differences in the other party's print settings or view. Before sending, select the entire document and press F9, then check it once more in Print Preview. If the document is going to a print shop or for review, it is recommended to export it as a PDF and check the page numbers.
5. Should the curly braces or gray shading beside the page number be removed?
Don't delete it. The gray shading is how fields are displayed on screen, and it will not appear when printed. The curly braces are the field boundaries; if you delete them, PAGE or NUMPAGES will no longer update automatically. If you don't want to see the shading, you can turn off field shading in the options. This only affects what you see on screen and does not affect the printed result.
📝 Summary
The page numbering "Page X of Y" relies on the combination of the PAGE and NUMPAGES fields; manually typing the numbers cannot change automatically as the page count changes. For ordinary documents, simply insert them following the steps. For documents with a cover page, sections, or a table of contents, use formula fields or SECTIONPAGES to adjust the counting range, and then verify in print preview.


