FRANKFURT—Donald Trump’s victory in the U.S. presidential election, after a campaign attacking free trade, has companies in Europe’s biggest exporting nation scrambling to tally up the impact.

Germany shipped $125 billion in goods to the U.S. last year, 2.5 times what it imported from the U.S., according to the U.S. Census Bureau. The U.S. is Germany’s largest trading partner, accounting for almost 10% of all German exports, according to Germany’s state statistical office.

“If...