I should also add that my answer assumes no delay and that what you see as the bid/ask is what you will get in that instant. By the time you click on the market order, the market will have moved. This is why platforms in addition to market buy and sell buttons have the option to buy the bid or the ask, and also sell the bid or the ask, which is all in addition to the buy and sell at market. This way, if you are willing to buy the ask, you lock it in at that price, and if the ask has actually moved since you saw it, you shouldn't get filled. At the same time, you have a much better chance of getting filled than trying to buy at the bid. In fact, you should be filled instantly if you buy the ask, unless of course the market has already moved in those milliseconds.