Use whereas when one clause states a fact and the second states a contrasting one. You're contrasting two things in one sentence: I'm very tall, whereas my wife is quite short. When whereas sits between the two clauses like this, put a comma right before it. If whereas opens the sentence instead, the comma moves to the end of the whereas clause: Whereas my wife is quite short, I'm very tall. The comma follows the whereas clause rather than coming before the word.
When Whereas Comes First
Lead with whereas when the contrast itself is the news: Whereas most flights stop over in Doha, this one goes direct. In this position the comma goes after the whereas clause, not before whereas: the comma sits between the two contrasting clauses, exactly where it is in that example, so a sentence like Whereas last year's sales rose, this year's fell. is punctuated the same way.
Keep whereas mid-sentence when your main statement comes first and the contrast qualifies it: This one goes direct, whereas most flights stop over in Doha. Readers get your point before the counterpoint.
Fronting suits formal comparisons and reports, where the shared background sets up the difference: Whereas last year's budget prioritised growth, this year's prioritises cost control. The reader knows a contrast is coming immediately.
Mid-sentence suits everyday sentences where both sides carry equal weight: I'm very tall, whereas my wife is quite short. Either order is grammatical here; you're choosing emphasis, not correctness.
Both positions need full clauses on each side of whereas, so save fragments for other conjunctions. If the second half has no subject and verb, it won't work in either spot.
One Place Whereas Never Goes
Whereas sits between clauses, not inside one. Say She likes tea, whereas her brother only drinks coffee, where each side has its own subject and verb. But She likes tea whereas coffee breaks down, because coffee alone has no verb for whereas to work against.
When you're drafting and the second half of the sentence feels like a fragment, that's the signal: whereas needs a full clause after it. I walk to work, whereas Tom drives works; I walk, whereas the bus doesn't, since the bus never does anything in that sentence.
One position is always out: whereas never closes the sentence. She likes tea, her brother coffee whereas isn't English. If your contrast lands last, put whereas before the second clause and let it lead the counterpoint instead.