Around a week after the detonation of both bombs, Emperor Hirohito announced to Japan that they surrender to the Americans. 
 The atomc bomb helped save millions of lives, by ending the war sooner.
Also, the war lasted from 1939, to 1945. A 6 year war cost the Americans, not only millions of dollars,but resources were being depleted. 
Around 200,000 civilans were dead beacuse of this bomb.  Had the war continue, edefeat America would've invaded japan, and lives from both sides, ( America, an Japan) woul'dve exceded both sides.   
In fact  the joint chief of staffs estimated, that the the casualities of a japan invasion would be from 250,000 and 1 million men. 

 President Truman wanted to end the war before the Russians could get involved. 
Truman didn't want to inform Staliin about the Atomic bomb. And Securty  Advisor. James brynes said to truman that a display of weapon ( atomic bomb could be used to bully Russia into defeat. 

The war was officially over on September 2, 1945 aboard the americnan batleship " Missouri"