A Free Calculator to Help You Calculate Your Dollar Cost Average Investments!

Updated: 9/07/2023

One of the most beautiful things about dollar cost averaging (or “ratable lump sum investing”) is that you’re buying on a predetermined timeline. The downside of this is that it can make it extremely tough to track your actual cost basis, however…and that’s why I made a free calculator to help!

Key Takeaways

  • Dollar Cost Averaging is ALWAYS a Good Idea
  • Total Investment/Total Shares = Average Cost
  • The Stock Market Has a 100% Success Rate of Increasing in Value
  • Knowing your Average Cost is Most Important in Active Taxable Investments

In this post, I’m going to cover the following major topics:

What is Dollar Cost Averaging and what is an Example?

Technically, dollar cost averaging means if you had a lump sum of money then you would take it and ratably invest that money over some time.

So, as an example of dollar cost averaging, if you had $12K fall into your lap from a bonus, inheritance, tax return, or any other reason, you might take that $12K and invest $1K every month for the next year. That would be dollar cost averaging.

The way that most people refer to dollar cost averaging is that you have a certain amount of money going into the stock on a predetermined period, such as every paycheck or every month.

gold pig with money next to it

So, if you put 5% of your salary into your 401k, every time that you get paid, 5% leaves the paycheck and is invested. This is not dollar cost averaging but rather ratable lump sum investing, but it’s semantics, I suppose!

At the end of the day, what matters most is that you’re investing on a very regular basis. The reason that I like to call out the difference is that the math shows that if you have a lump sum of money, you’re better off investing it all on day 1 rather than spacing it out over the course of time… assuming you know where you’re going to invest the money.

Is Dollar Cost Averaging a Good Idea?

For the rest of this post, I’m going to use the term “dollar cost averaging” as putting money into the market consistently, such as a 401k, or X amount/month going into your account.

So, is that a good idea?


I think that dollar cost averaging is one of the smartest things that an investor can do. By buying into the stock market at predetermined, consistent time-periods, you will avoid buying at the top of the market. Now, this also means that you’ll likely avoid buying at the bottom of the market, but that’s completely fine!

Not only is it impossible to perfectly time the market, but you would have to do it over and over again. And even if you did time the bottom, would you then be able to time the top so you knew when to sell?

As many people have said before, “time in the market beats timing the market”. To me, that means squeezing every dollar that you can into your investments as early as you can. If you can live off 80% of your income, why would you just stash that money into a bank account and invest it later?

  1. You won’t. You’ll spend it… or at least I would.
  2. You’ll lose out on time in the market where you historically will make 8%/year after inflation… not too shabby!

I know that one thing that terrifies people is investing in a down market. “The stock market goes down every day – why would I buy more stocks?”

Well…you just said the reason. Stocks are cheaper today than they were yesterday. So, if stocks historically always go up over time, and they’re cheaper today, then that means today is a better deal, right? Buy even more!

Two great quotes that I love from Warren Buffett sum this up perfectly:

“A market downturn doesn’t bother us. It is an opportunity to increase our ownership of great companies with great management at good prices.”

“Whether socks or stocks, I like buying quality merchandise when it is marked down.”

And again, don’t worry about the stock market going up. When I say that it has always gone up, I mean ALWAYS!

stock chart from 1930 to 2020

How to Calculate Your Dollar Cost Averaging

Calculating your dollar cost average into an investment is a pretty simple formula. You’re simply taking the total investment cost and dividing it by the total amount of shares that you have.

So, if you were to make a purchase of 10 shares for $100 total, then your average cost would be $10/share ($100/10 shares).

But, if you bought $100 of this same company at $10, $10.50, and $12, your average cost would be $10.77/share.

  • $100 investment/$10 share price = 10 shares
  • $100 investment/$10.50 share price = 9.52 shares
  • $100 investment/$12 share price = 8.33 shares
  • Total = $100 invested/27.86 shares = $10.77 dollar cost average

Free Calculator Tutorial

Learning how to calculate dollar cost averaging isn’t a hard concept to understand, but if you’re investing different amounts of money or investing at a high frequency, it can certainly be overwhelming and hard to maintain. Truthfully, I like to understand my dollar cost averaging on stocks I am investing in rather than something much more automatic like a 401k or HSA.

person using calculator on table with money around it

If I know that I like a certain company and want to work in certain position size, that’s something that I might tell myself, “you think the value of this company is X, so you can add to this company as long as the share price doesn’t hurdle the value that you think it’s worth, and continue to do so over the next 3 months.”

Doing so will allow me to accomplish a couple of things:

  1. Keep me from buying at the top
  2. Allow me to slowly earn money and add to that position

If I currently have $0 to invest and I want to get to $1,000, would it make sense for me to wait until I get the entire $1000 to invest or slowly add into that position as money becomes available?

Slowly add in, of course!

If I had an extra $100 after every paycheck, it would be foolish to wait for 10 paychecks to buy into this company, especially now that so many brokerages have $0 commissions and allow you to buy fractional shares, like Fidelity.

Being an Excel nerd, you probably already know that I like to track this, so I do so with this free calculator:

All that you need to do is enter the company name, the date that you bought, the amount you invested, and the share price that you paid, and the average cost will calculate, shown below:

If you need to add additional companies that you want to track, you can simply copy these columns and paste them to the right. And you can add more investment lines by simply inserting rows and updating the formula to the right of “Average Cost”.

Many brokerages will also calculate your average cost for you so you don’t have to do this, but there is an issue with how they do it. Below shows how Fidelity calculates my average cost for my favorite ETF, $MTUM:

The issue here is that they’re only calculating my cost basis within this account! So, even though I have bought MTUM multiple times in many different accounts, I cannot see that data very easily with Fidelity.

While it’s great seeing my investments within one specific account, if I am buying into a position of a company or ETF, I want to calculate my dollar cost average investment across all of the different accounts that I currently hold it in. This is only telling part of the story for me.

Now, one area that this is very beneficial with Fidelity is that by knowing the cost basis within each account, I can easily tax loss harvest because I know exactly what accounts and purchases I can sell for a loss to recoup some gains.

I’ve struggled through this predicament in the past and at the end of the day, nothing seemed more simple than simply tracking my purchases myself in Excel, so that’s why I made the calculator!

Do We Need to Know Our Average Cost?

At the end of the day, this is the most important question – do we even need to know what our average cost is? To answer this thoroughly, we have to break this into three different categories:

1 – Passively Managed Funds

For passively managed funds, such as an ETF or mutual fund, that you potentially invest in through a 401k or simply just add money into regularly, you do not need to know your average cost.

Most likely you’re investing in some sort of total stock market funds like SPY, VOO, or VTI and the point of these is simply to mimic the returns of whatever index you’re wanting to track. For me, that would be the S&P 500.

stock chart

My concept with this is simple – the stock market is undefeated as I’ve shown previously, so why not take a little bit of my investment and continue to add funds to that regularly.

Yes, I think that I can outperform the stock market, but I’m not ignorant enough to know that most people don’t typically outperform, so I view this as a hedging of bets.

Not to mention an account like a 401k doesn’t allow me to pick any individual stocks except for my employer.

2 – Taxable Accounts

Yes, I do find it beneficial to calculate the dollar cost average of your investments in taxable accounts mainly for tax benefits. As I mentioned before, when there is a downturn like 2022, you have the opportunity to sell some stocks that are down and offset those gains with some stocks that have risen greatly, generating a wash in the taxes.

Now, you should never sell an investment solely for tax purposes, but there could be a scenario where a stock has grown greatly and is overvalued and you simply want to trim your position a bit, and you can offset that with some losers where the business has fundamentally changed.

The key here is that if you can understand your average cost, you have another tool in your toolbelt to make an educated decision.

If you don’t know your average cost, then you’re simply just winging it and hoping for the best. One of these scenarios sounds much better than the other.

3 – After-Tax Accounts

After-tax accounts like a Roth IRA or Roth 401k mean that you’ve paid taxes and never have to pay taxes again, no matter how much your investment increases in value.

Pretty insane, right?

Another benefit of this is that your cost basis doesn’t matter one bit! Sure, you likely want to track the performance of your investment just like I do, but that’s more of a personal preference rather than you capturing any actual financial benefit from it.

You can solely focus on the thesis of why you invested in the company in the first place and not have anything to worry about with the “shell game” of tax loss harvesting.


At the end of the day, generally speaking, it’s good to know how to calculate dollar cost average investments if they’re in taxable accounts and those that are not repeatable investments that you blindly add to every paycheck.

Do you know what investments would qualify here? Andrew picks out a new stock each month that’s fundamentally undervalued with a great opportunity to appreciate at Value Spotlight!

Learn the art of investing in 30 minutes

Join over 45k+ readers and instantly download the free ebook: 7 Steps to Understanding the Stock Market.

WordPress management provided by OptSus.com