This is a matter of very hot debate. It depends on what assumptions you make about what would have happened in the future. But there are two basic scenarios:
- The bombings saved somewhere in the neighborhood of 250 - 500 thousand US lives, and Japanese lives in the millions.
- The bombings saved US lives numbered only in the thousands, and actually cost the Japanese up to a quarter of a million lives.
To my mind nobody is in a better position to make estimates of what a full-blown invasion would cost in lives than the people who were in charge of the armed forces at the time. Lukily for us, the US armed services did estimates for their own purposes before the A-bombs were dropped.
The Army estimated they would suffer 7.45 casualties/1,000 man-days and 1.78 fatalities/1,000 man-days in an invasion. So assuming the invasion of Kyūshū took 90 days, that works out to about half a million US Army wounded, and over 100,000 dead. If they then needed to invade Honshū and take the Capitol in another 90 day campaign, that would more than double the toll to about 1.2 million wounded, and over a quarter of a million US Army dead. This is about the lowest estimate you will find from Army sources, but being the most detailed I give it the most credence. But you should be aware there were numbers much higher floating around that decision-makers in the USA would have been hearing.
Interestingly, on this basis, the Army put in an order for about half a million Purple Hearts (the medal given for combat wounds of any kind). They have been working through this stockpile ever since, and still have over 100,000 of them left.
This did not cover Japanese casualties though. Presumably they would be even higher. This is all based on the assumption that the defence from the Japanese military and civilians would be simliar to what was encountered in Okinawa.
The Atomic bombings themselves are estimated to have killed about 150,000–246,000 people (almost all Japanese of course).
Both at the time and today there were those who claimed the Japanese would not have fought like they did on Okinawa, and in fact were close to surrendering in a way acceptable to the US. If they happen to be correct, then the death toll from the bombing is rather massively in the red (on the Japanese side. On the US side, it still saved lives). But we have no real way of knowing this. I know there are some documents floating around that some claim prove otherwise, but I'd posit anyone who insists some documents prove future actions of politicians has a poor (or idealistic) understanding of politicans.
Which side a person believes to me seems to have far more to do with what country that person hails from and/or how that person feels about Atomic Weaponry in general, than anything else. So the hope of there being a single impartial number that isn't somehow tainted by politics is remote in the extreme.