I was taught that it was basically a "draw", since at least officially (that is, by the terms of the treaty) everything was returned to its status before the war.
But if you take a close look at the whole American situation in the decades leading up to the war, and how the war was a key piece in CHANGING that situation (esp vis a vis the ability to sail and trade freely), you have to conclude that America ultimately gained a great deal of its main objective in the war. So even if I wouldn't necessarily say the U.S. "won" the war, the endeavor was in key respects a "success" (even when the successes were not always directly tied to victories in battle).
Some even think the U.S. lost because they believe that a central objective was to conquer the Canadian territories. Though this certainly played an important role, it was, in fact, NOT among the war's central causes, nor was it EVER among the official reasons given for going to war. So yes, they did fail to take Canada -- but is that "losing the war" if that's not what the war's PURPOSE was??
To get the right answer it's necessary to be clear about why the war was started/what the goals were.
As I hinted, much of the misunderstanding has to do with the notion that war must be about "taking territory" (or at least that this particular war was). By that measure NO ONE won the war, since at the war's end all territories were returned to whoever controlled them before the war.
But, in fact, gaining territory was NOT the objective of EITHER side!
More specifically, two major mistakes are often made here:
a) "the British were trying to retake their former American colonies (and failed)" No, that was NOT the British objective!
b) "a key American war-aim was to take Canada (perhaps annex it), and they were repelled" No. While there were those who desired this, this was NOT the reason for attacking the British in Canada and the government never stated any such thing
In other words, our Canadian friends are operating under the misapprehension that we declared war on THEM and/or on the British in order to annex Canada. But that simply is not the case.
The main (and stated) objectives of the U.S. are listed below. Note that each of them was, in fact, accomplished, though not necessarily all because of the war itself!
1) impressment of U.S. sailors. This was actually settled before war, with Britain largely acquiescing (though with slow communication the Americans did not yet know this)
2) interference in American TRADE, and hence with American sovereignty/independence.
This was mainly the result of the wars between Britain and France (and Americans suffered at the hands of BOTH powers). Once that war ended, the British no longer interfered in the same way. Thus the American objective was achieved, though not necessarily by the war!!
3) "Indian question" -- in the Northwest frontier wars. the British supported the Indians
This was the main NATIONAL reason for invading the Canadian territories.
(Though some in the Western states certainly wanted to annex the Canadian colonies, this was NOT the formal reason for the invasion, and the U.S. government never pushed for it.) Note, that the U.S. was indeed successful in reaching this objective. After the war the British were never again involved in assisting Indians vs. the U.S.
Although Britain was NOT attempting to retake its former colonies, all three of these issues DO have to do with the exercise of American independence/sovereignty, which was being treated rather lightly by the European powers.
Thus it is understandable that Americans regarded this as a "second war of Independence" even if it was not that in the STRICT sense. And this overarching objective -- of asserting its own sovereignty in issues of territory ("Indian question") and trade, America WAS successful.
SOME of the American success was an INDIRECT result of the war. In particular, the cutting off of trade with England ended up strengthening U.S. independent manufacture ...leading to greater ECONOMIC independence.
Another indirect result -- the expansion of the American navy in order to conduct the war contributed in other ways to America's ability to assert its sovereignty. One prime example -- immediately after the War the U.S. Navy was able to fully and finally address the problem of the Barbary Pirates in the quick and very successful SECOND Barbary War (1815) . In short, by the end of 1815, and in part THROUGH the War of 1812, the U.S. finally DID accomplish the sort of freedom to sail the seas and trade as it wished -- something it had hoped to gain through the American Revolution but never quite achieved.
Further, after the War of 1812 the U.S. was bolder to proclaim (and act on) its refusal to allow ANY European interference in the Western Hemisphere (note esp. the Monroe Doctrine). Ironically, the Battle of New Orleans, fought AFTER the peace treaty was signed but before news got back to America, played an important part in increasing this American confidence and probably also in discouraging foreign intervention.