Even when I know beyond a shadow of a doubt that I'm right about something, I rarely just blurt out, "I'm right; you're wrong." I tend to soften it a bit, more along the lines of "If my understanding of the situation is correct, I believe the correct course of action is..." or something else that allows the person in the wrong to save a bit of face. After all, no one likes a know-it-all.
But every so often, when the person in the wrong has expended a lot of time and energy yelling at you insisting that you are in the wrong, and then you are proven most definitely right, it's nice to gloat.
Just not to that person's face, as that would be rude.