I've shown how
you can do quick estimations of the CD yield after you take into consideration an early withdrawal penalty. However, if you want to get more exact, Bogleheads members
put together a wiki page
showing how you can calculate this in Excel along with some sample spreadsheets that can be downloaded.