Free investment calculators — no signup required
StockAverager logoStockAverager
Free · No Signup · Instant Results

How Many Shares Can I Buy?
Share Affordability Calculator.

Enter your budget and a share price to instantly see the maximum shares you can buy, the total cost including brokerage, and how much cash is left over.

How Many Shares Can I Buy?

Enter your budget and the share price

$
$
$

Shares You Can Afford

Whole shares, cost, and leftover cash

Enter your budget and share price to see how many shares you can buy

How Many Shares Can I Buy With My Budget?

The number of shares you can buy is simply your available cash divided by the price of one share, rounded down to a whole share (unless your broker supports fractional shares). Any flat brokerage fee is taken out of your budget first, so a commission reduces the cash left for shares.

Shares Affordability Formula

Shares = floor((Budget − Brokerage Fee) ÷ Share Price)

Round down to a whole share unless your broker allows fractional buying.

Worked Example

  • Budget: $5,000
  • Share price: $187.50
  • Brokerage fee: $0 (zero-commission broker)
  • Shares = floor(5000 ÷ 187.50) = 26 shares
  • Total cost = 26 × $187.50 = $4,875, leaving $125 in cash

Whole Shares vs Fractional Shares

Whole Shares

Traditional brokers sell shares in whole units. You buy as many full shares as your budget allows and keep the rest as cash.

Fractional Shares

Brokers like Robinhood, Fidelity and Interactive Brokers let you invest an exact dollar amount, so you can put your whole budget to work with no leftover cash.

How many shares to reach a target value?

Running the calculation the other way round

The question above starts with a budget and asks how many shares it buys. The reverse gets asked just as often: I want the position to be worth a certain amount — how many shares is that? The arithmetic is a single division.

Shares needed = Target Value ÷ Share Price

At a $50 share price, reaching $1,000,000 means holding 20,000 shares. At $187.50 it means 5,334. The number itself is easy; what it reveals is the gap between the target and the budget, which is the genuinely useful output. Twenty thousand shares at $50 is a million dollars of capital — so if the target is a million and the budget is $5,000, no share count solves it. Growth has to.

That is the honest answer, and it is worth stating plainly because the framing invites a misunderstanding. Buying more shares does not create value; it converts cash into stock at today's price. A position reaches a target value either because you put that much in, or because what you put in appreciated. To model the second route — a smaller sum compounding over years — use the CAGR calculator rather than this one.

What your budget actually buys

Three things that come out before the shares do

The formula divides your budget by the share price, but the budget it should divide is rarely the number in your head.

Commission

A flat fee comes out of the cash before any shares are counted. On a $500 budget, a $9.95 commission is 2% of your buying power gone before you own anything.

The spread

You buy at the ask and sell at the bid. On a liquid large-cap that gap is a cent; on a thinly traded small-cap it can be 1-2%, and it never appears as a line item anywhere.

Currency conversion

Buying a US-listed stock from outside the US usually adds an FX charge on top of commission, commonly 0.3-1.5% depending on the broker. It applies again on the way out.

None of these change the formula — they change the number you feed it. Enter your real all-in cost in the fee field and the share count you get back is one you can actually execute. To see the price that then has to be cleared before the position makes money, run it through the break-even calculator.

Should you spend the whole budget on one stock?

This tool answers “can I”, not “should I”

The calculator tells you the maximum your cash can buy. That maximum is almost never the right amount, because it is derived from what you happen to have rather than from what you can afford to lose on this particular idea.

A risk-first approach reverses the inputs: decide the percentage of your account you accept losing if the trade goes wrong, decide where the position would be proven wrong, and let those two numbers produce the share count. It usually returns a smaller position than your budget allows — which is the point. The position size calculator does that calculation.

There is also the question of timing. Deploying the whole budget at once is a bet on today being a good entry price. Splitting it across several purchases gives up that bet in exchange for a blended average, and if the price falls after your first buy, the average down calculator works out exactly what a second purchase does to your cost basis — including the commission you pay for the privilege of splitting the order.

Constraints the arithmetic does not know about

Four reasons the order may not fill the way the maths says

Dividing your budget by the share price gives the theoretical maximum. Several real-world limits can sit between that number and what your broker will actually let you buy.

Lot sizes

Most US and European markets trade in single shares, but several Asian exchanges enforce board lots — 100 shares in Hong Kong, 100 in Japan. If your budget buys 340 shares and the lot is 100, you can buy 300.

Minimum order values

Some brokers set a floor per order, commonly $1 to $50. On a very small budget this can rule out an order the arithmetic says is fine.

The price moves while you decide

A calculation made against a quote from five minutes ago can be wrong by the time the order reaches the market. A limit order caps the damage; a market order in a fast-moving stock does not.

Unsettled cash

Proceeds from a recent sale may not be available immediately, depending on your account type and market. The cash is yours but is not yet buying power, which is a common reason an order is rejected for insufficient funds.

None of these change the formula; they change what is executable. Where a broker supports fractional shares, most of them fall away, because you are buying a dollar amount rather than a share count and the leftover cash problem disappears entirely.

Frequently Asked Questions

How do I calculate how many shares I can buy?

Divide your available budget (after any brokerage fee) by the current share price, then round down to the nearest whole share. Formula: Shares = floor((Budget − Fee) ÷ Share Price). For example, with a $5,000 budget, a $187.50 share price and a $0 fee, you can buy floor(5000 ÷ 187.50) = 26 shares, costing $4,875 and leaving $125 in cash.

Can I buy a fraction of a share?

Many brokers (such as Robinhood, Fidelity, and Interactive Brokers) now support fractional shares, letting you invest an exact dollar amount rather than a whole number of shares. The calculator shows both the maximum whole shares and the fractional-share equivalent so you can use whichever your broker supports.

Do brokerage fees change how many shares I can buy?

Yes. Any flat commission or brokerage fee is deducted from your budget before shares are counted, so a fee reduces the cash available for shares. Most large US brokers are now zero-commission for stocks, but some markets and brokers still charge per-order fees — enter yours in the optional fee field for an accurate result.

How many shares do I need to reach $1 million?

Divide the target by the share price: at $50 a share, $1,000,000 is 20,000 shares. But that also means $1,000,000 of capital, because buying shares converts cash into stock rather than creating value. If the target sits far above your budget, the gap has to be closed by growth over time rather than by share count - model that with a CAGR calculator instead.

Why can I not afford as many shares as I expected?

Three costs come out before the shares are counted: any flat commission, the bid-ask spread you cross when buying, and a currency conversion charge if the stock is listed abroad. Together these commonly take 0.5-2% of a small budget. Enter your real all-in cost in the fee field and the result will match what your broker actually fills.

Is it better to buy all at once or split the purchase?

Buying at once is a bet that today is a good entry; splitting gives up that bet for a blended average across several prices. Splitting also costs more in commission if your broker charges per order, so on a small budget the fees can outweigh the benefit. Historically, deploying a lump sum at once has beaten spreading it more often than not - but splitting reduces the consequence of being unlucky with timing.

What if I have leftover cash after buying whole shares?

That is normal and usually not worth chasing. Leftover cash from rounding down is by definition less than the price of one share. If your broker supports fractional shares you can deploy it exactly; otherwise leave it, roll it into your next purchase, or accept it as the cost of trading in whole units.

Should I invest my whole budget in one stock?

Concentrating an entire budget in a single stock raises risk. Many investors spread a budget across several positions, or buy in tranches over time (dollar-cost averaging) rather than all at once. Use this calculator to size each position, then the Stock Averager to model averaging in over multiple buys.