To calculate first the percentage of your funds you want to spend on a given stock, take your amount multiplied by the percent (We have $90000 and want to spend 20% of that, so we type in 90000 x 0.2 = ). We now know we want to spend not more than $18000.

Now subtract the commission for the stock purchase ($9.99). Then divide the remaining number (17990) by the ask price of the stock ($32.77), like this: 17990 / 32.77 = . Round the number you get down to a whole number (remove the numbers after the decimal). Now you know you want to buy 549 stocks at the price of $32.77 each, which wonâ€™t cost more than $17,990.

You can check your math by multiplying the number of stocks (549) by the price (32.77). 549 x 32.77 = 17990.