If you spend $99 dollars and get $100 back then its worth mining.
So generally speaking, the amount of money wasted mining bitcoin is roughly equivalent to the amount of coins generated by mining.
This actually puts a cap on the value of bitcoin which is why its never going to get to a million like some people claim