‘When’ and ‘if’ are both used while referring to the future, as in I will be able to see you in the evening when I get off work and I will be able to see in the evening if I get off work. The difference between the two words is very basic and easily understood:

  • ‘When’ should be used while referring to something that one is certain will happen. The ‘when’ in ‘I will be able to see you in the evening when I get off work’ implies that the speaker is sure that s/he will get free from work in the evening.

  • ‘If’ should be used while referring to something that might or might not happen. The ‘if’ in ‘I will be able to see you in the evening if I get off work’ implies that the speaker is not sure that s/he will get free from work in the evening; it is a possibility, not a certainty.

However, it must be noted that ‘when’ and ‘if’ can be used interchangeably as well, in case the situation being referred to is predictable or repetitive. For example, the sentences ‘When I am in Calcutta, I stay with my family’ and ‘If I am in Calcutta, I stay with my family’ effectively mean the same thing. Another example is, ‘When you leave milk out, it ferments’ and ‘If you leave milk out, it ferments’.