Parimutuel works by pooling all bets in a given result, then dividing the pool by the total number of betting units held in wagers that match the winning result.
To make calculation easier to work and the customer experience easier to join, one betting unit is often equated to one currency unit (that is, one unit is worth one dollar, and one dollar buys one unit).
Since these systems are typically run for profit, the board or company will remove its share of the pool (the vigorish) prior to paying out.
Early bets can swing odds by a long way, because they form a greater proportion of the pool at that time (and we see why this matters later) so the company will often seed the pool with some amount known to be significantly larger than the expected bets. It typically accounts for this seed by removing an equivalent amount later, as part of the vigorish.
An example will best demonstrate how this system works. Our race will have three runners: A, B, C.
A is the favourite and bettors place #50 on the win.
B is good but less likely, so only #40 are placed.
Finally, C is the inconsistent runner that may upset the others, getting #10 bets placed.
These bets are pooled giving us a total of #100. The board takes their bit, say 10%, leaving #90 in the pool to be paid out.
Now consider what happens for each result.
if A wins, there is #90 to be paid out across #50 of bets, giving #1.8 as the payout.
if B wins, there are only #40 of bets, so 90/40 = #2.25 as the payout.
if C wins, there are just #10 to win with, giving 90/10 = #9 as the payout.
This calculation can be run at any time from the opening to the closing, and usually is updated every few seconds. This processing is done by a totalisator machine, often shortened to tote, and then displayed on TV or computer terminals, or transferred to a website.
Suppose we checked the bets earlier, and they had been in a ratio A:B:C of 40:30:5. The payouts at that moment would have been 1.69:2.25:13.5 making the favourite pay better and the outsider a lot longer than it ended up. This is incidentally the advent of fixed-odds bets, where a bettor can take the odds at that exact moment instead of waiting for the close to determine their payout.
At last, note that this process does not need to know how many runners are in the race because calculations are based on the units, or how many places are paid out because you can simply invalidate certain payouts, and allows for the combination of several different categories of bet (like say, mixing the wins and the places bets, or the quinella and trifecta bets).
To calculate the parimutuel odds for a place, the result of the above calculation is divided by the number of places available, whether it is one or two or three.