In essence, the price of a stock is determined by supply and demand in an open market environment. A price is not tied to any tangible metric of intrinsic value, instead a stock’s price could be said to be as high as the last trader to transact is willing to pay to purchase shares. The price changes during the stock market’s trading hours, and is quoted based on the most recently transacted trade. A price may also be sometimes quoted by bid price, because this hypothetically is the highest price willing to be paid according to the books.
There are many different indicators, financial metrics, or mathematical formulas that individual traders or institutions may use to decide what the fair value for a stock is, but there is not any one standard method that everyone must abide by. Market actors use the method that they feel provides the most accurate representation of value, and therefore gives them the greatest edge over competitors in determining future price direction and movement.
Examples of common technical indicators that may be used by traders are relative strength index, moving average indicators, MACD, stochastic indicators, volume weighted or price weighted average indicators, and a plethora of others. While these do not necessarily mathematically determine a fair market value for a security, the goal of traders who use them is to determine future price action based on the indicators readings. Because they initiate buying and selling, and all rational buyers and sellers must do so because they believe the price will be either higher or lower respectively at some point in the future, technical indicators do at some level represent and indication of market value.
On a more analytical level, an institution (or trader) may determine fair value based on a mathematical pricing model of a company based on the companies financial statements and expected future cash flows and business prospects. Examples of more academic analysis include discounted cash flow pricing models, capital asset pricing model (CAPM), Tobin’s Q, comparison methods where companies are compared to other similar companies in the same industry, and financial statement pricing models using metrics such as the current price to equity (P/E) ratio. There are other methods and each of these are fairly complex, and of course an institutional investor would model its fair value based on more than these relatively straightforward analysis.
Regardless of how market participants come to their conclusions on fair value, the stocks price truly comes down to what the market is willing to pay for it. This price is then quoted instantly as the transactions occur across various exchanges, as shares of a stock may trade at different prices across various exchanges at the same time. All trades must occur within the national best bid and offer (NBBO) so the price can not be arbitraged at more than the bid-ask spread.
However you value a stock, just remember the old adage from John Maynard Keynes that has proven itself true to many traders over the years, “the stock market can stay irrational longer than you can stay solvent”. The price is whatever the market dictates it to be, no matter how much one believes in a valuation method.