I have been researching the battles in the Pacific and it seems like in every engagement the USA was outnumbered or outgunned. Especially with the loss of the Pearl Harbor fleet, what made naval battles successful for the USA? I know at Midway the US recon was better and decrypted Japanese naval codes but were there any other factors that gave the US an advantage in sea battles?
USA was outnumbered or outgunned only during the first year of war. After that they always had naval supremacy.
While the number of ships was similar most battles were mostly ties (except for Midway). But once USA got material supremacy, they always had advantage (and the opposite is true as well). Even without the Midway battle USA would have won by brute force.
The important factors that gave USA an advantage were:
Huge industrial capacity. At least five times more naval production than Japan.
Better training, pilots particularly. The failure of Japan's use of the " Kamikaze solution" was because the pilots had almost no training.
Infinite access to petrol and resources. Japan didn't use submarines to attack merchant ships. By the end of the war Japanese fleet couldn't move because they lost almost all their merchant navy.
Better logistics. They were able to create bases from scratch in few weeks.
The Americans were able to "play looser" than the Japanese, which was a major advantage. The fact that American "looseness" caused us to be outnumbered in many of the early battles hid the fact that American power was superior, especially in the air, as early as late 1942. Putting Midway aside, the Americans were able to engage the Japanese with inferior forces in various battles, e.g. Coral Sea, Cape Esperance (Guadalcanal), etc., and still come up with decent results, because they knew their ships could be replaced. Conversely, the Japanese on several occasions failed to press their advantage with superior forces to "run up the score," (Pearl Harbor, Savo Island, Samar Straits near Leyte Gulf) after initial success, because they feared losing irreplaceable ships.
These postures, in turn stemmed from the superior American industrial capacity. We could build the equivalent of the Japanese fleet every 18 months (which the Japanese had taken 18 years to build), and still had plenty left to fight Hitler. Put another way, taking January 1, 1942 as starting point, America would turn out the equivalent of the Japanese fleet in mid-1943, late 1944, and mid-1946.
Japan basically assumed that it could win the war with a handful of decisive battles; first Pearl Harbor in 1941, then similarly single and one-sided battles in 1943, 1944, and if necessary in 1946. They would have to win all these victories with little loss of their own, Pearl Harbor style. If Midway had produced the "reverse" result of three American carriers lost to one Japanese, that would barely have been a "draw" for Japan in the attrition sweepstakes.
America had no need or reason to fight these decisive battles. They were able to set up a series of naval "knifefights" that wasted Japan's strength far more than their own. At Guadalcanal, the Americans proved to be fine "brawlers," even though Japan outmaneuvered us strategically. In order to win the war, Japan would have to fight every battle with one-sided losses like Savo Island or Tassafaronga; not even "every other" battle would suffice, if losses were about even in some battles. America used its power to ensure that the battles were too numerous for Japan to win every one of them.
President Roosevelt laid out the American strategy in his 1943 State of the Union Address:
During this period we inflicted steady losses upon the enemy -great losses of Japanese planes and naval vessels, transports and cargo ships. As early as one year ago, we set as a primary task in the war of the Pacific a day-by-day and week-by-week and month-by-month destruction of more Japanese war materials than Japanese industry could replace. Most certainly, that task has been and is being performed by our fighting ships and planes. And a large part of this task has been accomplished by the gallant crews of our American submarines who strike on the other side of the Pacific at Japanese ships—right up at the very mouth of the harbor of Yokohama.
We know that as each day goes by, Japanese strength in ships and planes is going down and down, and American strength in ships and planes is going up and up. And so I sometimes feel that the eventual outcome can now be put on a mathematical basis. That will become evident to the Japanese people themselves when we strike at their own home islands, and bomb them constantly from the air.
The Americans had no need to engage the Japanese in "setpiece" battles. They spread out their superior forces, especially submarines and aircraft all over the Pacific Ocean, looking to "assassinate" targets of opportunity. They sank 11 million tons of Japanese shipping (out of 12 million), and were in a position to "firebomb" major Japanese cities. The Japanese had no response to such tactics.
In 1943, when the Americans intercepted information that caused them to make an "assassination" attack on Admiral Yamamoto, this was possible because his plane arrived at the appointed spot within a few seconds of the Americans' calculations; the Japanese "scripted" their high level movements that exactly.
I don't like it when good people get dismissed as "lucky". In general, I don't believe in that kind of luck. "Luck" is when preparation meets opportunity. It takes skill, ability, and work to get into a position where you get to be lucky. However, in that sense, you could say the US won Midway through luck.
If it weren't for a single squadron of US torpedo bombers finding the Japanese fleet first, and their crews doing their jobs even though their equipment was so bad that doing so must have seemed pointless suicide (0 hits, and all but one member of the squadron died that day), things could have ended very differently. In the event, destroying the hopeless torpedo planes pulled the Japanese air cover down low, and made them change plans to the point where their decks became stuffed with fully-fueled planes and multiple kinds of aircraft ordinance. That inopportune moment is when 3 American dive bomber squadrons found them.
Now of course in the short run the result was a really big deal. But the Japanese knew what they were doing, and they took their opportunities during the war as well. So it may be better to note that the loss of those 4 carriers essentially ended any hope of winning the war for Japan, whilst the USA lost at least nine carriers during the war, and still ended the war with far more carriers than they started with (or needed).
Another way to look at luck is to look at professional gambling. My prob-stat teacher made the point that the reason "the house always wins" is true is generally not just because the odds very slightly favor them. Its true because they have the financial resources to keep playing through unlucky streaks that would bankrupt a mere human.
So the USA won battles mostly as a result of being competent, and of having the ability (through their superior production capacity) to hang in the war long enough for things to start going their way. The Japanese were effectively gambling against The House.
I have been researching the battles in the Pacific and it seems like in every engagement the USA was outnumbered or outgunned were there any other factors that have the US an advantage in sea battles?
The numerical outnumbering is true nearly exclusively in the initial stages of the war. It was not long after Midway that the Americans had a massive numerical superiority.
However if you look at the battles prior to Midway, most of them were actually at best strategic victories (or neutral) but absolutely were tactical losses for the USA.
- Pearl Harbor. Clearly a tactical loss for the USA but in some ways a strategic victory - all the USA carriers escaped unharmed and nearly none of the actual base installations were attacked. Given that the overwhelming majority of the role of battleships in the war was shore bombardment (or AA, later in the war) this still was not a strategic victory for Japan.
- Along with Pearl Harbor, Japan won all sorts of smaller naval engagements against the USA/Great Britain/Australia/NZ, sinking a lot of ships and capturing bases with nearly no losses
- Battle of Coral Sea. Another solid tactical victory for Japan (they trade a light carrier for one American fleet carrier sunk and another damaged, leaving the Americans with a single operational fleet carrier) but a tactical victory for the allies, as Japan stops its advance
- Battle of Midway. The first real solid win by the Americans, but with 3 fleet carriers and a land base vs 4 fleet carriers it's hard to really say they were massively outnumbered.
Keep in mind Midway was a few small not-getting-so-lucky decisions away from being a crushing defeat for the Americans. While it was a massive victory in hindsight, other than a few dive bombers the Americans were very ineffectual.
After the Battle of Midway, there were not many major engagements in the Pacific until the early 1943 except Guadalcanal (which incidentally resulted in another Japanese tactical win and strategic loss, during the Battle of Savo Island). The allies sort of won the Battle of the Eastern Solomons, if you can say that both the American and Japanese carriers getting damaged enough to require repairs is a "win."
Several other engagements throughout the latter half of 1942 were slightly in favor of either the Japanese or Americans.
This was mainly because both sides were lacking in operational carriers and airplanes. The Japanese were devastated from Midway but the Americans weren't in a whole ton better shape with damage from Midway, with the Yorktown sunk. Later in 1942 the Wasp and Hornet would also be sunk, with only a few Japanese light carriers actually sunk in exchange.
Throughout the last half of 1942 neither side had a decisive battle. Two campaigns result in sunk American fleet carriers at nearly no carrier cost to the Japanese (a single light carrier).
Arguably this was a series of strategic victory for the United States but tactical losses but it came at a time when they could afford this - in early 1943 the volume of ships that the Americans were building (Essex class fleet carriers for example) start showing up and nearly all future battles result in the Japanese being significantly outgunned.
Basically for most of 1942 and early 1943, the Americans consistently either had tactical losses with a few strategic wins in nearly every battle other than Midway. The main reason this didn't affect the long term outcome of the war was the industrial and personnel production of Japan was significantly lower than the Americans.
How was the USA able to win naval battles in the Pacific?
tl;dr: realistically the Americans didn't win naval battles very significantly other than Midway prior to having overwhelming numbers.
As you state, code breaking played a large role in the Battle of Midway. However so did luck, as the Japanese scout plane which spotted the American ships launched late, resulting in the munitions swap happening right when an American attack showed up piecemeal and haphazard.
Once the war got into the later years, the Americans pretty much had advantages in every single aspect from a tactical perspective. Better and more equipment for both aircraft and ships, better trained pilots and personnel, better tactics (particularly with respect to submarine and anti-submarine tactics), significantly better supplies (oil especially), mobile dock/repair infrastructure including floating drydocks, and massive numerical superiority. The United States also started expanding their navy in the late 1930s which corresponded to the explosion of ships they had mid-war.
Divide and conquer: the Japanese obligingly divided their forces, and the Americans proceeded to conquer.
If you look at the overall numbers for the Pacific fleets, the Japanese certainly had the advantage at the start of the war, at least in terms of large ships. However, if you look at individual engagements, the numbers are far closer:
- Battle of the Coral Sea: 128 American aircraft vs. 127 Japanese aircraft.
- Battle of Midway: 233 American carrier aircraft vs. 248 Japanese aircraft. (American land-based aircraft were largely ineffectual here.)
- Battle of the Eastern Solomons: 177 American aircraft vs. 176 Japanese aircraft.
- Battle of the Santa Cruz Islands: 136 American aircraft vs. 199 Japanese aircraft.
Non-carrier surface actions generally involved cruisers and destroyers, which the American Pacific fleet had in abundance.
In addition to Santiago's answer, I would add that the 1942 Doolittle Raid on Tokyo, and the Japanese defeat at Midway, led to the Japanese forces taking a more conservative stand and prevented them from taking full advantage of their victory at Pearl Harbor. Francis Pike, in his book, Hirohito's War: the Pacific War 1941-1945, the Doolittle Raid was a "stunning blow" to the pride of the Japanese Navy. Admiral Yamamoto was forced to deliver a "groveling" personal apology to the Emperor. Pike writes, "from a practical point of view the raid's most significant and lasting effect was to draw more war resources to home defense than had previously been the case.
In addition, the loss of so many of the Navy's top pilots during the battle of Guadalcanal. According to interrogations of Japanese officers, The Japanese lost 1000 pilots from August 1942 to 1943 during the U.S. invasion of Guadalcanal and its long struggle to hold it. Japan lost in additional 1500 pilots in 1943 in the Munda-New Georgia-Bougainville defense.
Contrary to other views, I think that the U.S. Navy's success in code-breaking is a bit over-rated, aside from the extra advantage it gave the U.S. at Midway, when compared to the US manufacturing capabilities. According to Michael Smith, author of The Emperor's Codes: The Thrilling Story of the Allied Code Breakers Who Turned the Tide of World War II, the U.S. and British code-breakers had difficulty with Japanese naval and army operations messages because the uniformed services were a bit more careful to change their codebooks, and allied code-breakers had difficulty keeping up. Nevertheless, the Japanese were over-confident that their language itself would cause troubles for the allies to decode and translate coded messages. Also the Japanese were less careful in operational radio security rules, sending some messages in the clear, and using identical language in addressing certain officials.
That being said, the US weapons manufacturing and shipbuilding capabilities, and the resolution of the fuses on submarine torpedoes, made the Allied forces unbeatable.
However, after the grueling battles to take Guadalcanal, Okinawa, Saipan, and Luzon convinced Allied leaders that any attack on the Japanese mainland would be a long war of attrition and force the allies to take arms against women, children, and the elderly.