The formula for the simple interest compound is

in which time is given in years.
then, the simple interest is

the compounded interest formula is

In which n is the number of compounds made in 1 year, and t is given in years.
then the compounded semiannually is done 2 times per year, which leads to

then the difference between the compound and the simple interest is
