It's been a pretty rough go of it for Toyota (TM -1.35%) recently. After sales in the U.S. and Europe imploded during deep recessions, Toyota was greeted by two natural disasters in 2011. The horror continued as a territorial dispute with China led to severe backlash and several quarters of shrinking sales. Finally, sales in the U.S. are surging this year, but Toyota finds itself competing with reinvigorated American automakers Ford (F 0.66%) and General Motors (GM -0.17%), both of which are producing very competitive vehicles in all segments.

So last week, when Toyota nearly doubled its profit while selling fewer vehicles, even the ghost of Houdini was impressed with such a magic trick. For those of us that don't believe in magic, there's a rational explanation for how Toyota pulled the rabbit out of the hat in the second quarter.

Second quarter
After the reported 94% increase in profits it became very evident the weak yen was having a strong effect. The large increase equated to a $5.5 billion in profits and the outlook remains good enough for management to raise guidance for its fiscal year by 8%. Many analysts expect Toyota's full-year net income to reach a six-year high aided by a surging U.S. market and weak yen.

The yen has declined 13% against the dollar this year making its exports much more profitable. The weak yen essentially reduces cost of exports on the global market place by about 25%, which gives Toyota a handful of weapons to use to its advantage. Because of that advantage Toyota opted to produce more vehicles in Japan than its competitors: 21% of Toyota's vehicles are exported from Japan, compared to 13% and 4% for Nissan and Honda, respectively.

Toyota could lower prices or raise incentives to boost sales revenue while remaining just as profitable thanks to this exchange rate advantage with its exports. It could also spend more cash on redesigns and load up features for standard models, making the vehicles much more competitive. Or Toyota could simply do nothing and enjoy a ballooning bottom line from the favorable exchange rate – which appears to be the case because its profit increased 94% with revenue only increasing 14%.

Bottom line
In its attempt to match increasing demand in the U.S., Toyota's largest region, it announced it will be the first automaker to build more than 10 million vehicles in a single year. It will be interesting to watch this story play out, as Toyota still faces an uphill battle to regain lost market share in China, as the automotive market in Japan continues its decline.

For Ford and GM investors, it's also important to keep an eye on how Toyota uses the weakening yen to its advantage. Investors don't mind if Toyota continues to rake in profit as long as it doesn't lower vehicle prices or start an incentive war – both situations would be difficult to match and stay profitable for U.S. domestic automakers.