A 13-1 pre-race underdog, Cloud Computing dashed the Triple Crown hopes of Kentucky Derby winner Always Dreaming, who finished a distant eighth.
At 13-1, Cloud Computing paid out $28.80 to win. Finishing third was 30-1 long shot Senior Investment.
The win for Cloud Computing was the second Preakness win for jockey Javier Castellano, who rode Bernardini to victory in 2006. Trainer Chad Brown won his first Preakness Stakes on Saturday.
The Preakness has a $1.5 million purse, of which $900,000 goes to the winner. Classic Empire gets $300,000 for finishing second, and Senior Investment $165,000 for third place.
Here are the individual betting payouts.
2017 Preakness payouts