How to Add Page Numbers in Excel

How-to basics · Updated November 20, 2026

To add page numbers in Excel for Microsoft 365 on Windows, open the worksheet in Page Layout view, click a header or footer area, then choose Header & Footer > Page Number. Excel adds a page-number field that appears on printed pages and in Print Preview, not in ordinary worksheet cells. You can also add a total-page count or set the numbering to start at a chosen number.

What You’ll Need

  • A desktop version of Excel, such as Microsoft Excel for Microsoft 365 on Windows. Excel for the web does not provide the same tools for inserting page numbers; open the workbook in the desktop app to add them.
  • A worksheet with a print area or page layout you are ready to print. You can add numbering before or after setting margins, orientation, and scaling.
  • Access to the workbook in edit mode. If it is read-only, save a writable copy before changing its headers or footers.

Step-by-Step

  1. Open the worksheet you want to number. Page numbering is configured for each worksheet, so select the sheet whose printed pages need numbers. If you plan to print several sheets, remember that adding a footer to one sheet does not automatically add it to the others.
  2. Switch to Page Layout view. Select the View tab, then choose Page Layout in the Workbook Views group. The worksheet appears as printable pages, with header space above the grid and footer space below it. This view makes it easier to see where the number will sit. You can also begin from the Insert tab, but Page Layout view is a clear way to expose the header and footer areas.
  3. Choose a header or footer position. Click the area labeled Add header at the top of a page, or click Add footer at the bottom. Each has left, center, and right sections. Click the section where you want the number—for example, the right footer if you want it away from the worksheet data. Excel displays the contextual Header & Footer tab when the header or footer is active.
  4. Insert the page-number field. On the Header & Footer tab, in Header & Footer Elements, select Page Number. Excel inserts a field into the selected section. The field is not a fixed number: it updates automatically for each printed page. Avoid typing a number such as “1” yourself, because that would repeat the same text rather than number pages in sequence.
  5. Make the numbering label clearer, if needed. Click before or after the page-number field and type ordinary text such as Page . For a label like “Page 1 of 4,” type “Page ” before the field, type “ of ” after it, then choose Number of Pages on the Header & Footer tab. Excel inserts the total-page field as well. The two fields update when the worksheet prints to a different number of pages.
  6. Check the result in Print Preview. Select File > Print to open the print screen and inspect each page. Use the page navigation controls in the preview to check the first, middle, and last pages. Confirm that the number is visible, in the desired position, and not clipped by the printer margins. Press Esc to return to the worksheet without printing.
  7. Adjust page setup if the number or data is crowded. In the print screen, review the selected printer, paper size, orientation, margins, and scaling. You can return to the sheet and use Page Layout > Margins or Page Layout > Orientation to make room. If the workbook needs a particular starting number, open the Page Setup dialog from the small dialog launcher in the Page Setup group, select the Page tab, and change First page number from Auto to the number you want.
  8. Save the workbook and print when ready. The header or footer setting is saved with the worksheet. Use File > Print to print, or save the workbook so the page-number field is ready for a later print job. If you are printing to PDF, use the same preview to verify the final pages before saving the PDF.

Alternative using Page Setup: If you prefer a dialog instead of the Page Layout view, open Page Layout, select the small dialog launcher in the Page Setup group, and open the Header/Footer tab. Choose a built-in footer or header that includes page numbers, or select Custom Footer or Custom Header. Click the left, center, or right section, then use the page-number insert button. Choose the total-pages button too if you want “Page 1 of 4.” Select OK to apply the setting.

On Excel for Mac, the feature is also available through Insert > Header & Footer or the Page Setup options, though the ribbon layout and labels can vary slightly by release. In Excel for the web, you may be able to view or print an existing header or footer, but use the desktop app to create or edit page-number fields.

Common Mistakes

  • Looking for the number in a cell. Page numbers in Excel are header or footer fields used for printed output. They do not populate worksheet cells, and they may not be visible in Normal view. Check Page Layout view or Print Preview instead.
  • Typing a digit instead of inserting a field. Manually entering “1” does not make Excel number subsequent pages. Use Page Number so Excel can generate the correct number on each printed page.
  • Forgetting that each sheet has its own settings. A footer on one worksheet does not necessarily carry over to another. Check every sheet you intend to print, especially when printing a selection of sheets or an entire workbook.
  • Confusing page count with page number. Page Number inserts the current page, while Number of Pages inserts the total number of pages. Use both, with text such as “Page ” and “ of ”, for a “Page 1 of 4” format.
  • Checking only the first page. A footer can be cut off, covered by a printer margin, or placed awkwardly on later pages. Preview multiple pages and check the final page before printing a long sheet.
  • Expecting numbering to appear on screen in Normal view. This is not a sign that the field failed. Excel separates worksheet content from print headers and footers, so the number is primarily seen in Page Layout view and print output.

Tips

  • Use the footer for a conventional printout. A page number in the center or right footer is easy to find and usually stays clear of column headings. A header can be useful if the footer contains a file name, date, or other information.
  • Keep the label short. “Page 1 of 4” is clearer than a long sentence and less likely to collide with other footer content. If you already use the center footer for a title, put the number in the right footer section instead.
  • Set the print layout before final review. Changing paper size, print area, margins, or scaling can change how many pages Excel produces. Add the fields when convenient, but do a final Print Preview after those settings are settled.
  • Use a custom footer when you want precise placement. The custom footer dialog lets you choose a left, center, or right section and combine page fields with text. It is also a useful alternative when you cannot find the contextual Header & Footer tab.
  • Remember that page order affects the sequence. For worksheets that span both rows and columns, review the page order in the Page Setup dialog if the sequence seems unexpected. Numbering follows the order in which Excel prints the pages.
  • Use a starting number only when there is a reason. If a sheet is a continuation of an earlier section, set First page number to the next number in the sequence. Leave it on Auto for ordinary print jobs so Excel starts numbering automatically.

Troubleshooting

The page number is missing from the printout. First check that you inserted it into a header or footer section, not into a cell or a text box. Open File > Print and check the preview. If it is missing there too, return to Page Layout view and click the header or footer to confirm the field is present. Also check that the correct worksheet is selected and that the print settings are not printing a different sheet or selection.

The number appears in Page Layout view but not on paper. Check the printer’s printable margins and the worksheet’s margin settings. A footer placed too close to the page edge may be outside the printer’s printable area. In Page Layout > Margins, choose a roomier margin or open custom margins and adjust the footer position. Preview again before printing.

Every page shows the same number. The footer may contain a typed digit rather than a page-number field. Delete the repeated digit, click the correct header or footer section, and insert Page Number from the contextual tab. Then inspect more than one page in Print Preview to confirm the sequence advances.

The total page count is wrong or changes unexpectedly. Excel recalculates total pages based on the print area, scaling, paper size, and page breaks. Review the print area and scaling settings, then preview again. If you add or remove rows, columns, or manual page breaks, the total can legitimately change. The total-pages field reports the count for the current print setup, not necessarily the number of populated worksheet rows.

The number is absent in Excel for the web. Open the workbook in the desktop Excel application and add the field there. If you cannot install or access desktop Excel, ask someone with the desktop app to set up the header or footer, then review the resulting printout or PDF.

Frequently Asked Questions

Can I add page numbers without printing the worksheet?
Yes. Add the field and save the workbook without printing. The number is stored in the header or footer and appears when you later preview, print, or create a PDF. It will not show as a value in the worksheet grid.

How do I number pages as “Page 1 of 5”?
In a header or footer section, type “Page ”, insert Page Number, type “ of ”, and insert Number of Pages. Preview the sheet to confirm that both fields appear in the intended order.

Can I start numbering at a number other than 1?
Yes. Open the Page Setup dialog, go to the Page tab, and set First page number to the number you need instead of Auto. This is handy when a worksheet continues a numbered report.

Can I put page numbers on every worksheet in a workbook?
Yes, but check each worksheet. You can select multiple sheet tabs together to apply shared page setup changes, then ungroup the sheets by selecting a single tab. Be careful: while sheets are grouped, edits can affect every selected sheet. Preview each sheet because their print areas and page counts may differ.

Can page numbers appear on the first page but not the others, or vice versa?
Excel’s header and footer settings include options for a different first page and for different odd and even pages. Open the Page Setup dialog’s Header/Footer tab and enable the relevant option, then configure the first, odd, or even page header or footer separately. Check the preview to verify the result.

Why do page numbers change when I print?
The field is dynamic. Excel recalculates page breaks and the total page count from the current print settings, so changes to scaling, paper size, margins, or print area can change the page sequence. Set those options before your final preview.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.