So you've decided to invest in the stock market, and even have some ideas of what stocks you want to buy! But how do you actually buy those shares?

Fortunately, the process of buying your first shares of stock online is relatively quick and easy. Here's a step-by-step guide to kick-start your investing journey.

  1. Find the best online broker for you
  2. Open and fund your brokerage account
  3. Decide which stocks you want to buy
  4. Decide how many shares to buy
  5. Decide on your order type
  6. Enter your stock orders
  7. Sit back and relax

1. Find the best online broker for you

The dynamics of choosing the best online stock brokers have changed a bit. Most major brokers, such as Charles Schwab, TD Ameritrade, and others, have eliminated trading commissions, which has largely taken cost out of the equation.

That leaves two main considerations when comparing brokers: whether a broker meets your needs and the ease of use of their trading platform. 

  • Does a broker offer everything you need? For example, some brokers offer excellent educational resources for new investors, access to stock research, and other useful tools. Some online brokers offer in-person branches, so if you decide you want some face-to-face guidance it could be just a short drive away. Other features that might matter to you include the ability to trade on foreign stock markets and the ability to buy fractional shares of stock, and not all brokers offer these.
  • Is their platform user-friendly and easy to navigate? If you plan on trading from your phone or other mobile device, you need to make sure that the broker's mobile platform is user-friendly enough for you. Fortunately, many popular brokers allow you to test-drive their trading platforms with play money before you sign up. Try a few and see which you like the best.
Man sitting at table, using laptop.

You might be surprised at how easy buying your first stock can be. Image source: Getty Images.

2. Open and fund your brokerage account

Once you've chosen a brokerage, the next step in the process is to fill out the new account application. It's a good idea to have your driver's license and Social Security number handy, as well as your bank account information if you plan to fund your new account from your checking or savings account. This is typically a quick and easy process.

When filling out the account application, two decisions you might have to make are:

  • Do you want margin privileges? This essentially means that you'll have the ability to borrow money to buy stocks. While investing on margin is typically not a good idea, having margin privileges can be a benefit in some cases -- for example, you generally cannot use deposited funds until they clear unless you have a margin account.
  • Do you want options trading privileges? If you're a newer investor, it's generally a good idea to stay away from options until you really know what you're doing. There are usually several levels of options privileges to choose from, and you can always apply to change yours later on.

When it comes to funding your account, you have a few choices. The most common options are an electronic funds transfer (EFT) from your checking or savings account, mailing the brokerage a check, or wiring the money.

3. Decide which stocks you want to buy

Without getting too deep into methods of analyzing and selecting individual stocks to buy, the next step in the process is to determine the stock(s) you plan to buy in your new account.

A couple things to keep in mind:

  • Focus on the long term. Buy stocks that you want to own for years, not that you think will do well over the next few weeks or months.
  • Diversification is a smart idea. Don't put all of your money into just one or two stocks. Even if you're starting the account with a relatively small amount of money, commission-free trading has made it practical to buy just a few shares of several different stocks.

If you want to learn more about these ideas and other considerations for buying stock, check out our guide to get started investing in the stock market. And of course, if you want some suggestions, here are some stocks we love for beginning investors

4. Decide how many shares to buy

To determine how many shares you should buy, first determine how much money you want to invest in each stock. Then, divide this amount by the stock's current share price. You can find this by either entering the stock's ticker symbol or by running a search for the company on your brokerage platform.

If your brokerage allows you to purchase fractional shares, you can simply use the result of this calculation. Many don't allow this, so you'll have to round down to the nearest whole number to determine how many shares you can buy.

For example, let's imagine that I want to invest $1,000 in Microsoft (NASDAQ: MSFT). Then, let's say I check Microsoft's share price and find it's trading for $149.50 per share. Dividing $1,000 by this share price gives a result of about 6.7. Assuming that my brokerage doesn't allow fractional shares to be bought or sold, this means that I can buy six full shares of Microsoft stock.

5. Decide on your order type

You'll have the choice between several different order types, and "market" orders are typically the best choice for long-term investors. This tells the brokerage that you want to buy the stock immediately, and at the best available price.

The other commonly used order type is known as a "limit" order. This tells the broker the maximum price you're willing to pay -- for example, if a stock you want to buy is trading for $20.50 per share but you want to buy it for under $20, you can enter a limit order that instructs your broker to only buy if the price reaches the desired level. 

Once you fill out your trade ticket and hit the "place order" button, it should just take a matter of seconds before your broker executes the order and shares show up in your account.

6. Enter your stock orders

The final step to buy shares of stock is to place the order with your broker. Here, you'll enter the stock symbol you want, whether you want to buy or sell shares, and how many shares you want.

7. Sit back and relax

Once you've bought your first stocks, you can sit back and relax, and let the long-term compounding power of the stock market do the work. If you want your dividends to be automatically reinvested into more shares, you can typically enroll in your broker's dividend reinvestment plan (DRIP) with the touch of a button.

As a final thought, while it can be tempting to check your stocks every day (especially at first), it's important to keep a long-term mindset. Certainly keep up with the latest news out of your companies by reading quarterly reports and subscribing to news alerts. However, if your stocks go down a bit, don't panic and sell. And if your stocks go up by a few dollars, resist the urge to cash out. The best way to build wealth over time is to buy shares of great companies and to hang onto them for as long as they remain great companies.