XOR

The XOR function performs an exclusive or of 2 numbers that returns a 1 if the numbers are different, and a 0 otherwise. Learn more.

Video field
Logical

The XOR function in Google Sheets is a logical function that stands for "exclusive or". It returns a logical value of TRUE if only one of the provided arguments or expressions is TRUE, and FALSE if none or more than one of the expressions are TRUE.

The syntax for the XOR function in Google Sheets is as follows: =XOR(logicalexpression1, [logicalexpression2, …])

Here, logicalexpression1 is required, while logicalexpression2, logical_expression3, and so on are optional arguments that you can include up to 253 times.

For example, the following formula would return TRUE because only one of the arguments is TRUE:

=XOR(TRUE, FALSE, FALSE)

The formula would return FALSE because all of the arguments are TRUE:

=XOR(TRUE, TRUE, TRUE)

And the formula would also return FALSE because none of the arguments are TRUE:

=XOR(FALSE, FALSE, FALSE)

Want even more from Google Sheets?


With Softr, you can turn your spreadsheets into powerful web apps.You can give advanced roles and permissions to each user, build advanced logic and automation flows, customize the design to your needs, and much more.


Softr also offers a growing library of templates for internal tools, client portals, community hubs, and more. The templates come with a Google Sheet or an Airtable base that you can use to store and manage your data easily.


Try Softr now and build your custom web apps in 10 minutes no code required!