Page X of Y in InDesign

This post is based on a question asked during my recent InDesign Advanced class, which was: “Is it possible to do automatic numbering, where it tells the user which page they are on and the total number of pages in the document”. The answer is yes, and it is actually very easy to do.

To achieve this effect requires two features, which are: Curent Page Number and a Text Variable.


Page numbering is normally placed on master pages, so that’s where this tutorial starts. On the A-Master, I have started by selecting the Type Tool and created a text box. In the text box I have typed in: “Page” then pressed the spacebar (you might prefer it without the word “Page” – I will leave that decision up to you). Next we need to add in the Current Page Number by going to: Type > Insert Special Character > Markers > Current Page Number. That will insert an “A” because I am working on the A-Master. The A is our current page number, and will show as a number on the normal pages in the document. The word “of” was then typed in with spaces on both sides.

Next we need to display the total number of pages the document contains. Luckily there is a Text Variable that stores the last page number in the document – perfect. To use this variable all we need to go to is Text > Text Variable > Insert Variable > Last Page Number. It will probably show “1” as the last page number – don’t worry if this is incorrect, as we are still on the master page.

Check it out

Now that the setup is complete, double-click on any normal document page in the Pages panel and……. it works! great hey?

Keep a look out for more posts about Text Variables coming soon! Thanks Rob for the question