At a high level, the market (buyers and sellers) determine the price, not some mythical "calculator". How that is determined is that buyers and sellers come together and agree on a price to transact at. The exchange takes care of all of this - there is no human-to-human interaction in exchange trades.
For most stocks, there are many buyers and many sellers. But they all have different prices that they are willing to buy or sell at. This is illustrated in the order book in a market. It contains all of the prices that buyers are willing to buy at (bids), and all prices that sellers are willing to sell at (asks). When a buyer is willing to buy at a price that a seller has indicated (the "ask") then a trade is made at that price. Each order also has a amount that is asked for or up for sale which can change the matching slightly, but that's the high-level process.
So a broker may be publishing the last transaction price, or may show you the bid and ask separately. So if you want to buy a stock at the current "price", you'd pay the ask price. If you want to sell at the current "price", you'd pay the bid price. Those may be very different than the last transaction depending on the liquidity (number of buyers and sellers) and the momentum of the stock.
Is there ever a buyer without a seller in the vast majority of cases?
Well, there are almost always buyers that want to buy at a certain price, but there may be no one willing to sell at that price. It's only when those prices converge that a trade is made.
Sometimes it's said that "supply & demand" determines stock prices.
That's true, but it may make more sense if you think of "supply" as sellers willing to sell at the current bid and demand as buyers willing to buy at the current ask. If buyers are more "aggressive" than sellers (meaning demand is high), then as buyers fill the current seller's order, the next seller's order up the ask chain is filled and the "price" rises. And vice-versa for high supply.
For example, I may be willing to buy Apple stock at $250, but if there is no one that's willing to sell for $250 then my order will go unfilled. At the same time, if there are other buyers that are willing to buy for more than $250, then those orders will be filled before anyone is willing to sell at my price. so it would take a lot of sellers (supply) to fill all of those orders and bring the price down to my level.