Sometimes if and whether are interchangeable, but sometimes using one or the other will change the meaning of your sentence. Here are some examples and an explanation.
Today's topic is whether—not rain or snow, but whether w-h-e-t-h-e-r, as in whether you like it or not, it's the topic.
First, let's figure out when to use whether and when to use if.
If Versus Whether
Although in informal writing and speech the two words are often used interchangeably, in formal writing, such as in technical writing at work, it's a good idea to make a distinction between them because the meaning can sometimes be different depending on which word you use. The formal rule is to use if when you have a conditional sentence and whether when you are showing that two alternatives are possible. Some examples will make this more clear.
Here's an example where the two words could be interchangeable:
Squiggly didn't know whether Aardvark would arrive on Friday.
Squiggly didn't know if Aardvark would arrive on Friday.
In either sentence, the meaning is that Aardvark may or may not arrive on Friday.
Now, here are some examples where the words are not interchangeable:
Squiggly didn't know whether Aardvark would arrive on Friday or Saturday.
Because I used whether, you know that there are two possibilities: Aardvark will arrive on Friday or Aardvark will arrive on Saturday.
Now see how the sentence has a different meaning when I use if instead of whether:
Squiggly didn't know if Aardvark would arrive on Friday or Saturday.
Now in addition to arriving on Friday or Saturday, it's possible that Aardvark may not arrive at all. These last two sentences show why it is better to use whether when you have two possibilities, and that is why I recommend using whether instead of if when you have two possibilities, even when the meaning wouldn't change if you use if. It's safer and more consistent.
Here's a final pair of examples:
Call Squiggly if you are going to arrive on Friday.
Call Squiggly whether or not you are going to arrive on Friday.
The first sentence is conditional. Call Squiggly if you are going to arrive on Friday means Aardvark only needs to call if he is coming.
The second sentence is not conditional. Call Squiggly whether or not you are going to arrive on Friday means Aardvark needs to call either way.
To sum up, use whether when you have two discrete choices or mean "regardless of whether," and use if for conditional sentences.
Next: Whether Versus Whether or Not