If I want something then I generally categories it as if it is must needed, if it will significantly improve quality of life, or it is just for fun.
If it is must then no choice buy or lease.
If it will improve quality of life then how much does it cost. there is no real formula but if it is less than my 1 day's income then I'll mostly buy it. Eg. Flying instead of taking 17-20hr train ride.
If it is just for fun then it has to be significantly cheaper than my 1 day's income plus it should bring some enjoyment. Eg. going on fun trips, etc.
Edit - I'm currently mostly living on paycheck to paycheck + 6 months reserve in case of emergency. But if you are making much more and are able to save then of course go ahead and buy it.