Just remember that whatever price you see on the tsp.gov site for the C,S,I,F,G is a rounded number. When you see a price of 20.15, it could mean 20.14987 or it could mean 20.15334. So it could take a while to figure out that data.
It can probably be done if you put all of the S&P 500 prices into a spreadsheet for the past 3 years, then next to the top row, put in the C fund price from 3 years ago. Use another cell to calculate the % change of the S&P 500 from one day to the next. Copy that formula all the way down. Then make a formula under the C fund column to apply the percentage change of the day to the previous C fund price. Copy that formula all the way down the column.
Compare the last calculated C fund price to the current one. If it is off, adjust the earliest C fund in the right direction a little.
Example: The spreadsheet calculated the C fund to be 14.99, instead of 14.74. You'd have to keep adjusting the C fund price from 3 years ago by minute decimal amounts until you can get today's calculated C fund price to match the actual C fund price.
Of course this does not take into account whatever small percentage they are collecting as operating costs.