What is the difference between ex ante investment and ex post investment?

Ex ante investment is the planned investment and ex post investment is the actual investment.

Planned investment is investment which is desired to be made by firms and planners in economy during the year whereas actual or realised investment is the investment made during that period.

According to Keynes investment in inventory of unsold goods is unplanned investment so actual investment is the sum of planned and unplanned investment.

Unplanned investment is that investment which was not included in planned investment.