It is important to consider inflation when investing because it erodes the purchasing power of money over time. If an investor does not account for inflation when calculating their investment returns, they may end up with lower purchasing power in the future.