The number beside the buy button

Market vs limit orders: why your trade price can differ

A stock is a share of ownership in a company, bought and sold in units called shares. If the screen shows $100, seven shares might seem to cost $700. Yet a completed trade can cost $700.80 before fees. The displayed price may describe a past trade, while only some of the shares offered now are available at that price. Follow one seven-share purchase through the sellers' offers.

· Published: · Updated:

Shares and dividends

A recent trade is not an offer to sell you seven shares

To buy shares, your instruction needs to meet a seller willing to trade at a compatible price. When that actually happens, the trade is an execution or fill. A last-traded price records an earlier fill. It does not promise the same price for your next purchase.

Instead, look at the prices at which sellers currently offer shares, called asks, and the quantities beside them. A list of buying and selling prices and quantities is an order book. The table shows just the selling side of a fictional book.

Assume continuous trading, where matching orders can trade throughout the session, at one venue. Prices and quantities do not change while our order is processed. There are no hidden orders, fees or taxes. These invented offers do not reproduce a real security's market.

Scroll wide tables sideways. Keyboard: focus the table, then use the arrow keys.

Shares offered for sale in our example
Ask levelPrice per shareShares available
Lowest ask$100.003
Next ask$100.205
Third ask$100.504

Only three shares are available at $100. That cannot supply seven. In a real market, those shares may also be sold or repriced between reading the screen and your order arriving. Freezing the book here lets us separate that timing issue from the calculation.

One market order can produce two execution prices

A market buy asks to buy at the available selling prices without setting your own maximum price. Our seven-share purchase first takes the three offered at $100. Four are still needed, so it takes four at $100.20. There are five available there: enough to finish, leaving the fifth untouched. None at $100.50 are needed.

The total is 3 × $100 + 4 × $100.20 = $700.80. Divide by the seven shares actually bought to get $100.114285… per share, or $100.11 to two decimals. The extra $0.80 above the initial $700 estimate comes from four shares costing twenty cents more each. It is not a fixed market-order fee.

In practice, a market order uses the prices and quantities available when it reaches the market. A halt in trading or too few sellers may prevent immediate completion. It prioritises prompt execution without your own price ceiling; it does not promise every share at the price displayed earlier.

A $100.20 limit is a ceiling, not the price of every share

A buy limit adds a condition: do not pay more than this much per share. You can still buy below the ceiling. A sell limit sets the minimum you will accept. Either condition can leave the order unfilled if the other side will not meet it.

For each row, restore the original book and try a separate seven-share order. The rows do not take shares away from one another. Assume ordinary limit orders stay valid after the first available trades, with no instruction to cancel an unfilled remainder immediately. The table stops just after the order first arrives and is processed.

Scroll sideways on a narrow screen. The cost column includes only shares actually bought.

Results immediately after each order reaches the fictional book
OrderShares filledExecution costAverage fill priceShares unfilled
Market buy, 7 shares7$700.80$100.110
$100.00 buy limit, 7 shares3$300.00$100.004
$100.20 buy limit, 7 shares7$700.80$100.110
$99.90 buy limit, 7 shares0$0.00—7

At a $100.20 limit, three shares cost $100 and four cost $100.20. Enough qualify within the ceiling, so the result matches the market order in this example. With a $100 limit, only three qualify. The price condition and obtaining the full quantity are separate outcomes.

Three bought and four waiting is a partial fill

The $100 limit has bought three shares for $300, with four still unbought. That is a partial fill. It is neither a complete failure nor a purchase of all seven. To find the average paid, divide $300 by the three filled, rather than the seven requested.

The $99.90 limit bought nothing. Its execution cost is zero, but its average price is not zero: there is no average because there was no trade. The table's dash marks that distinction.

Seeing someone else trade near your limit later does not prove your own order filled. Available quantities, your arrival time and the venue's rules for which order goes first matter too. Our stationary book explains the arithmetic, not how many shares a live order will obtain.

Waiting for the other four depends on the instructions

After setting a price, read how long the instruction can remain valid. Our example allowed the $100 limit's remaining four shares to wait. Other conditions can stop that happening.

Immediate-or-cancel means trade what can be traded immediately and cancel the remainder. Fill-or-kill means trade the entire order immediately or cancel it all. Both differ from filling part and leaving the rest waiting.

The broker and venue determine which instructions are offered, which trading sessions they cover and when they expire. Rules from one market need not apply in another. Read the conditions for the actual order.

A message confirming that an order was sent is not confirmation that shares were bought. Keeping those steps separate helps you check what remains live before placing another order.

The confirmation should account for shares as well as money

For our market order, add the two execution amounts and divide by seven. Use the unrounded total when checking the calculation: multiplying the displayed $100.11 by seven gives $700.77, three cents short because the displayed average was rounded.

Then check any separate charges and the remaining order quantity. A confirmation of a cancellation request is not necessarily confirmation that cancellation succeeded. Verify fills and cancellations before placing a replacement; otherwise you can end up with two live orders instead of one.

These mechanics matter when buying an ETF too. Choosing its holdings and getting an execution price are separate tasks. Our guides to ETF basics and comparing funds tracking the same index cover the product side; stock splits and reverse splits explains another reason a share price can look different.

About the examples

The order book, quantities, tables and calculations are invented. Each order starts independently from the same book, with continuous matching at one venue and no price changes during execution. Hidden orders, routing, fees and taxes are excluded.

Average fill prices divide execution cost by filled shares and round to two decimals. An unfilled order has no average fill price. Available order types, session coverage, expiry, priority and cancellation rules depend on the broker and venue. This model is not an execution forecast or a trade recommendation. See our editorial policy.

Back to Shares and dividends →