suppose one company has 1M share, 100K Sold out,900K left and the current price of each stock is $5. so if i buy another 100K what will be the stock price . assume that no one selling .
There isn't a formula like that, there is only the greed of other market participants, and you can try to predict how greedy those participants will be.
If someone decided to place a sell order of 100,000 shares at $5, then you can buy an additional 100,000 shares at $5.
In reality, people can infer that they might be the only ones trying to sell 100,000 shares right then, and raise the price so that they make more money. They will raise their sell order to $5.01, $5.02 or as high as they want, until people stop trying to buy their shares.
It is just a non-stop auction, just like on ebay.
The problem with predicting with accuracy what a stock price will do in any given situation is that there are two main factors that affect a stocks price.
The first factor is based somewhat in math as it takes into account numbers such as supply and demand, earnings per share, expected earnings, book value, debt ratio and a wide variety of other numbers. You can compile all those numbers into a variety of formulas and come up with a rational estimate of what the stock should sell for. This is all well and good and if the market were entirely rational it would rarely make news because it would be predictable and boring. This is where our second factor throws a wrench in the works.
The second factor affecting stock price is emotional. There are many examples of people's emotions affecting stock price but if you would like a good example look up the price fluctuations of Apple (AAPL) after their last couple earnings reports. Numerically their company looks good, their earnings were healthy, their EPS is below average yet their price fell following the report. Why is that? There really isn't a rational reason for it, it is driven by the emotions behind unmet expectations. In a more general sense sometimes price goes down and people get scared and sell causing further decline, sometimes people get excited and see it as opportunity to buy in and the price stabilizes. It is much more difficult to anticipate the reaction the market will have to people's emotional whims which is why predicting stock price with accuracy is near impossible.
As a thought along the same line ask yourself this question; if the stock market were entirely rational and price could be predicted with accuracy why is there such a wide range of available strike prices available in the options market? It seems that if stock price could be predicted with anything remotely reassembling accuracy the options market need a much smaller selection of available strike prices.