Exiting conversations gracefully

I admire people who are able to exit conversations gracefully. At parties it's relatively easy to start talking with other people, but in one on one situations it's much harder. For example, if someone asks to grab coffee, it's hard to exit when you realize that the conversation isn't going to be fruitful. Often there isn't anything actively wrong with the conversation, but it just isn't going anywhere.

Being able to exit this kind of situation without hurting the other person's feeling seems like an important life skill. Done poorly, this will come off as rude and arrogant. But if executed well, this should be viewed as considerate of both people's time. From what I've seen, the best way to do this is to stand up, thank the other person, and indicate what to expect next without any excuses / apologies.