Wauvel

Excel like a finance pro.

← The library

Logical function

XOR

Returns TRUE when an odd number of arguments are true.

Rarely usedDifficulty 1200 · ProficientUsage rank #272 of 520
Practice · 2 questions →

When to use it

Exclusive or: TRUE when an odd number of arguments are TRUE. With two arguments, TRUE when exactly one is.

The shape of it

Syntax
=XOR(logical1, [logical2], ...)

Worked examples

  • One of two

    =XOR(TRUE,FALSE) TRUE

    Exactly one.

  • Both

    =XOR(TRUE,TRUE) FALSE

    Both, so not exclusive.

  • Three arguments

    =XOR(TRUE,TRUE,TRUE) TRUE

    Three is odd.

Worth knowing

  • "Either a discount or a coupon, not both": XOR(discount>0,coupon>0).
  • With more than two arguments it is a parity check, which is rarely what people mean.
  • Introduced in Excel 2013.

Where it goes wrong

  • The odd-count rule surprises people expecting "exactly one".
  • Text arguments are ignored.

Related

Learn the moves here — or let Wauvel run them on your numbers.

Meet your AI CFO →

One CFO-grade Excel tip a week

A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.