How to Use the FACT Function in Google Sheets

Published on

The FACT is a math category function in Google Sheets. We can use it to find the factorial of a given number.

We can use factorial (denoted by n!) to find all the possible ways to arrange/order a set of distinct objects. In short, it’s for counting permutations.

For example, we can arrange the letters “X,” “Y,” and “Z” in 6 distinct ways.

It is as follows – “XYZ,” “XZY,” “YXZ,” “YZX,” “ZXY,” and “ZYX.”

The factorial is the product of a certain whole number (n) with all the numbers (non-negative integers) below it, i.e., <=n.

For example, let’s consider # 3.

3!= 3 x 2 x 1 = 6

We can easily find the factorial of an integer using the FACT function in Google Sheets. Here are the syntax and formula examples.

FACT Function in Google Sheets – Syntax and Argument

Syntax: FACT(value)

Value (parameter 1)- The non-negative number or cell reference for which you want to calculate and return the factorial.

Points to be Noted:

  • If the value is not an integer, it is truncated.
  • When the value is a reference, and it is blank, the function will add (zero) to it.
  • If the value is a text, the formula will return #VALUE!
  • When the input value is negative, the FACT function in Google Sheets will return #NUM!

Formula Examples

1. Non-negative number (Hardcoded):

=fact(3)

2. Non-negative number (Cell Reference):

Enter 3 in cell B2 and insert the below FACT formula in cell C2.

=fact(B2)

The FACT Function Array Formula Usage in Google Sheets

We can follow three methods to find the factorial of the numbers 1 to 10 in Google Sheets. Here are them.

Method 1 – Non-Array Formula:

Input the numbers 1 to 10 in an array, for example, in cell range A1:A10.

Use =fact(A1) in cell B1 and copy it. Paste it down until B10.

Method 2 – Array Formula:

Instead of the copy-paste formula, we can use the below FACT function Array Formula in cell B1.

=ArrayFormula(fact(A1:A10))
Examples to FACT Function in Google Sheets

Method 3 – Array Formula:

This time, we can use SEQUENCE to generate the numbers 1 to 10 within the formula.

=ArrayFormula(fact(sequence(10,1)))

Here the numbers in A1:A10 are not required. The SEQUENCE takes care of that numbers.

Reverse Factorial in Google Sheets

I don’t have any specific function to find and return reverse factorial in Google Sheets. But I do have a workaround method that you can try.

Please follow the below steps (except for the numbers 0 and 1).

  1. Enter any factorial in cell A3. For example, insert 3628800 in cell A3, which is the factorial of the number 10.
  2. Insert the following Vlookup in cell C3 =ifna(vlookup(1,{B3:B,sequence(rows(B3:B),1,2)},2,0)).
  3. In cell B3, enter =A3/2.
  4. In cell B4, enter =B3/row(A3). Copy-paste it down until you get the the number <=1.
Reverse Factorial Formula in Google Sheets

See cell C3 for the output.

That’s all about using the FACT function and finding reverse factorial in Google Sheets.

Thanks for the stay. Enjoy!

Prashanth KV
Prashanth KV
Your Trusted Google Sheets and Excel Expert Prashanth KV is a Diamond Product Expert in Google Sheets, officially recognized by Google for his contributions to the Docs Editors Help Community and featured in the Google Product Experts Directory. Explore his blog to learn advanced formulas, automation tips, and problem-solving techniques to elevate your spreadsheet skills.

Google Sheets: Get the Last Row with Any Data Across Multiple Columns

It’s common to have several empty rows at the bottom of a Google Sheet,...

How to Calculate Digital Root in Google Sheets

The digital root is the single-digit value you get by repeatedly summing the digits...

How to Build an Advanced Book Tracker in Google Sheets: Formulas Explained

If you're tired of forgetting what you've read, which books you rated 5 stars,...

Google Sheets Reading List Tracker Template (Free Download)

Looking for a smarter, more visual way to manage your reading goals? This Google...

More like this

Google Sheets: Get the Last Row with Any Data Across Multiple Columns

It’s common to have several empty rows at the bottom of a Google Sheet,...

How to Calculate Digital Root in Google Sheets

The digital root is the single-digit value you get by repeatedly summing the digits...

How to Build an Advanced Book Tracker in Google Sheets: Formulas Explained

If you're tired of forgetting what you've read, which books you rated 5 stars,...

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.