In a conversation with Dr. Strange on Titan when they first met he said:
Dr. Strange: Who wants to murder trillions. Thanos: With all six stones, I could simply snap my fingers. They would all cease to exist. I call that mercy. Dr. Strange: And then what? Thanos: I'd finally rest and watch the sun rise on a grateful universe.
His last line implies that he will be there when all this happens, so he is spared from the snap.
The way he executed the snap also implies that he should live. I mean he was there surrounded by the avengers. If he allowed himself to be included, he would risk letting the gauntlet with all the infinity stones just lying there for the avengers to use to revert back. I think the biggest task in his plan is ensuring that no one will tamper with it, so he must live to do that (I guess this might be the plot of the next Avengers movie).
He is the last person from Titan, so he is spared whether he intended to or not as per his plan of taking only half of the population of each planet.