A stock's price is not calculated. It also is not set by a governing body. Rather, the stock price is developed in an incredibly efficient method of supply and demand. The more investors want to own a piece of a company, the higher the price will be, and it will continue to rise until investors no longer want to own the shares at that price.
You may think that supply and demand would equalize and make for a stable stock price for many companies. However, an auction allows for relatively large movements in price. Many companies are significantly affected by the moves of commodity prices, government economic indicators, or the stock price of other companies. If you combine those influences with a large and diverse investor community, there can be a wide degree of opinion as to what the company's stock price should be at any given time. In these situations, one investor may consider a stock price to be expensive while another considers it cheap. This difference in perspective causes constant movement of a stock price.
Many influences from outside the company affect the stock price. Changes in the pricing of competitive companies or suppliers can make a stock price look attractive (or less attractive). Also, the general news of the day regarding raw materials, consumer spending, labor issues and geo-political confrontations can cause investors to re-evaluate the value of a company. This requires a level of omniscience to interpret the best value that most investors simply do not possess.
Some investors, typically known as technical traders, do not look at the value of a company's operations but only consider its stock price and trading volume. They make guesses as to the direction of the stock's movement for the next minute, hour, day, week, month, or longer. Technical traders use indicators that are built by mathematicians to try to interpret a company’s price based on price changes without regard to the fundamentals of the company. They may then trade that stock based on this prediction of future stock price levels. Typically, technical traders are not investors, they are not taking a long-term holding in the company but rather are going to flip the shares quickly in response to their favorite technical indicators.
I try to put some rationality into establishing a stock price in my book, The Confident Investor. I don't assume your omniscience; you don't have to understand every possible variable to arrive at a reasonable price. You also do not need to understand all of the technical math theory of the technical traders.
My technique that I call GOPM (Grow on Other People’s Money) allows you to find high-quality companies that are fundamentally well-run. You then use a focused set of technical trading skills to know when to buy and when to sell that stock. This allows you to take advantage of the rises and falls of the stock market. These rises and falls are caused by the various theories of the value of the company that I describe at the beginning of this article.