How is the late fee calculated?

I paid according to how I received income, mostly dividends and capital gains in Q2 and Q4 and I got a small late fee of $12.  Do I need to be pro-active and estimate capital gains in Q2 for example if I'm going to incur the gain in Q4?

 

My understanding is that if I incur income in, say, Q2 then I should pay an estimated tax on that amount in July.  Am I wrong?