Who Won the Battle of Saratoga?

There were two battles fought at Saratoga that were fought 18 days apart. The first gave the British Army the upper hand in the Revolutionary War, but in the end the American army prevailed during the second battle, giving the Americans the upper hand during the remainder of the war.