Rich said:
there is no formula. It's all a big lookup table (seriously).
Actually, there is a formula (the lookup table has to be calculated
somehow). I spent many, many hours trying to figure out how to
duplicate the values in the lookup table, but I couldn't. =) Finally, I
emailed the Treasury Direct customer service, and they gave me the
formula. Now I can match up my Excel sheet exactly with the online
tool:
http://wwws.publicdebt.treas.gov/BC/SBCPrice
If you're curious how they calculate the values, here's the formula:
For every 6 month period,
PV = A (1+ r/2)^(i/6)
where A = starting amount for each 6 month period.
r = composite rate
i = ith month of the period (1, 2, 3, ... 6)
Special rules:
For the initial period, set A = $25. Round to the nearest cent. Then
scale to your bonds value. So if you have a $100 bond, multiply by 4.
You will have to do this calculation for every 6 month period. It gets
pretty tedious, so you're better off just using the calculator tool.