I figure it is pretty easy to figure out if I can afford something. Do I have cash available (my paycheck already has retirement funds etc. deducted before it shows up in my checking account)? I also have a separate saving account for medium term savings and a separate brokerage account for long term investing (and a Roth IRA). So the money in my checking account basically is how much I have to spend. If I have the money and want to spend it, I can afford it. If I don’t have the money, I can’t afford it. I can just save until I can.
There is a nice post, How to find out if you can afford something, that explores when that simple concept isn’t quite enough.
I made this mistake when I decided to start a saltwater aquarium. I found a great deal on the tank and some supplies on Craigslist, and went ahead and bought it. What I didn’t factor in was the costs of additional supplies, fish and ongoing maintenance. Turns out, saltwater aquariums are an expensive hobby. In hindsight, I wish I had done my homework a little more.