If I were doing this, I'd write down the following information:
Date Amount Price Shares CPI
2000/01/01 $1000 $100 10.000 168.800
2000/02/01 $1000 $110 9.091 168.900
2000/03/01 $1000 $90 11.111 171.200
2000/04/01 $1000 $130 7.692 171.300
Total $4000 37.894
You can get the CPI information from a table. The other information is available as part of the purchase transaction.
Without inflation, we have a $4000 investment that is currently worth the modern price times the number of shares. Let's use a modern (2010/01/01) price of $200.
37.894 * $200 = $7578.80
That's the current value on January 1st, 2010.
So the return is
($7578.80 - $4000) / $4000 = .8947 = 89.47% increase
It's more complicated with inflation, as we can't just multiple $1000 by the number of months. We have to normalize on some specific point in time. For example, we might calculate everything in January 1st, 2010 dollars. The CPI on that date was 216.687.
So now we take $1000 in 2000/01/01 and convert it to 2010/01/01 currency:
$1000 * 216.687 / 168.800 = $1283.70
And three more times
2000/02 $1282.93
2000/03 $1265.70
2000/04 $1264.96
That gives a total of $5097.29 invested in 2010/01/01 dollars.
($7578.80 - $5097.29) / $5097.29 = .4868 = 48.68% increase after inflation
Note that it would probably be easier to do this in a spreadsheet, which may even have functions to calculate these things for you.
Also, inflation numbers are usually a little out of date. For example, the October 1st numbers aren't out yet (on October 24th). So you wouldn't have been able to do this exact calculation until February of 2010. Or you'd only be able to do the equivalent calculation now (October 2016) through September 1st, 2016.
I just used the prices from the other answer (except the $200, which I made up myself). I made no attempt to get accurate data on that. For the CPI information, I used the real data. Mostly because it was easier than making it up. Note that a real investment would likely have additional fees and dividend reinvestments. Perhaps those would get hidden in the share price. Perhaps not.