First of all, I hope that when you say endgame, you refer to that stage of the game where King safety is not so big of a concern.
If so =>
There is really no rule of thumb or method to this. You descend into an endgame hoping to make best use of your position and material. More pieces on the board, more complications. Fewer pieces, fewer complications. No pieces and just pawns .. then it comes down to exact calculation.



If you were facing a situation in the middle game, where you had to choose between bishops, knights, your queen, or rooks, which is the best in the endgame? For me, I would choose to have a queen trade, then trade off on of my rooks, and possibly my knights or a bishop. and obviously a few pawns.