To understand why this happens, let’s first dive into what exactly is meant by closing price, opening price, and how their values are computed for a stock. 

Closing price – In simple words, closing price is a stock’s trading price at the end of each trading day. It basically is the latest price of the stock until the next trading session starts. In case of equities, the closing price is calculated as the weighted average price of the last 30 minutes of the trading day (from 3 pm to 3:30 pm).

Opening price – The opening price is the price at which a stock trades first when the exchange opens on the trading day. Usually, for equities, the market timings are from 9:15 am to 3:30 pm. However, the exchange begins the collection of orders from 9 am to 9:08 am. This is known as the pre-market window, where orders are taken from the public beforehand, and for the next 7 minutes before the markets officially open, these orders are matched to determine at what price the stock should open at 9:15 am. 

This pre-market window can affect the opening price of stock based on the demand and supply of that particular stock. In a nutshell, this causes the opening price to be different from the previous day’s closing price.

After market orders (AMOs) can also contribute to the difference between the closing and opening price. AMOs are types of orders that are placed after the markets are closed, which then lead to variations in the price of the stock.

Likewise, if any news related to the company is released when the market is closed, it can influence the investor’s decision to pay for the company’s stock and therefore, automatically cause a fluctuation in the price of the stock even when no trades are made. Positive factors can surge the stock price, whereas negative news updates will do the exact opposite.