How to sort contacts (by first or last name) on stock Android Marshmallow and Lollipop phones
By default, Android smartphones provide contacts lists (or address books, if you want to call them like that) which sort contacts alphabetically by first name. But what if you like your contacts to be sorted by last name? Well, Google lets you easily change the way contacts are sorted. This can be done either from your phone app, or from your contacts app. Mind you, we're going to deal only with stock Android Lollipop (5.x) and Marshmallow (6.0) here, since non-stock Android handsets almost always have their own ways of dealing with contacts and address books.
To sort your contacts by last name, you first need to open your phone or contacts app. Then, you'll see a menu button (in the form or three vertical dots) in the upper right corner of the screen. Taping on that opens up a Menu from which you'll need to select the "Settings" tab. If you're in the contacts app, the Settings sub-menu lets you directly choose the way your contacts are sorted (by last name, or first name). If you're in the phone app, you have one extra step to follow: from the Settings sub-menu, you need to tap on the "General" tab, and only then you can change the way contacts are sorted. You also have the option to choose the name format of your contacts: first name first, or last name first.
The screenshots below were taken on a device running stock Android 5.1.1 Lollipop. While the Marshmallow phone and contacts apps do come with a few tweaks, not much is changed compared to the Lollipop versions, so sorting contacts by first or last name is done in exactly the same manner.