How the price of share is determined

What is the formula or market rule for share pricing?

The price is determined by the last transaction between a buyer and a seller. It is influenced by company performance, industry trends, and economic factors.