# FACT

In this comprehensive guide, we will explore the Excel FACT function, which calculates the factorial of a given number. The factorial of a number is the product of all positive integers less than or equal to that number. For example, the factorial of 5 (denoted as 5!) is 5 � 4 � 3 � 2 � 1 = 120. The FACT function is particularly useful in various mathematical and statistical calculations, such as permutations and combinations.

## FACT Syntax

The syntax for the FACT function in Excel is quite simple, requiring only one argument:

=FACT(number)

number – The non-negative integer for which you want to calculate the factorial. If the number is not an integer, Excel will truncate it.

## FACT Examples

Let’s go through some examples to better understand how the FACT function works in Excel.

Example 1: Basic usage of the FACT function

Suppose you want to calculate the factorial of 5. You can use the FACT function as follows:

=FACT(5)

This formula will return 120, which is the factorial of 5 (5 � 4 � 3 � 2 � 1).

Example 2: FACT function with a non-integer number

If you input a non-integer number, Excel will truncate it before calculating the factorial. For example, if you want to calculate the factorial of 5.8, you can use the following formula:

=FACT(5.8)

Excel will truncate 5.8 to 5 and return 120, which is the factorial of 5.

Example 3: FACT function with a negative number

If you input a negative number, the FACT function will return a #NUM! error. For example, if you try to calculate the factorial of -5, you will get an error:

=FACT(-5)

## FACT Tips & Tricks

Here are some tips and tricks to help you get the most out of the FACT function in Excel:

Tip 1: Use the FACT function in combination with other functions

You can use the FACT function in combination with other Excel functions to perform more complex calculations. For example, you can use the FACT function with the COMBIN function to calculate the number of combinations:

=COMBIN(n, k) * FACT(k)

Where n is the total number of items, and k is the number of items to choose from the total.

Tip 2: Use the FACTDOUBLE function for semi-factorials

If you need to calculate the semi-factorial of a number (also known as the double factorial), you can use the FACTDOUBLE function in Excel. The semi-factorial of a number is the product of all integers of the same parity (odd or even) that are less than or equal to the number. For example, the semi-factorial of 5 is 5 � 3 � 1 = 15.

=FACTDOUBLE(number)

## Common Mistakes When Using FACT

Here are some common mistakes users make when using the FACT function in Excel:

Mistake 1: Using a negative number as the argument

As mentioned earlier, the FACT function will return a #NUM! error if you input a negative number. Make sure to use non-negative integers as the argument for the FACT function.

Mistake 2: Using a non-integer number without considering truncation

When using a non-integer number as the argument for the FACT function, Excel will truncate the number before calculating the factorial. Be aware of this behavior to avoid unexpected results.

## Why Isn’t My FACT Function Working?

If your FACT function isn’t working as expected, consider the following possible issues:

Issue 1: Negative number as the argument

As mentioned earlier, the FACT function will return a #NUM! error if you input a negative number. Make sure to use non-negative integers as the argument for the FACT function.

Issue 2: Non-integer number not truncated as expected

If you’re using a non-integer number as the argument for the FACT function and the result is not as expected, double-check your input and remember that Excel will truncate the number before calculating the factorial.

## FACT: Related Formulae

Here are some related Excel functions that you might find useful when working with factorials and other mathematical calculations:

1. FACTDOUBLE: Calculates the semi-factorial (double factorial) of a number.

=FACTDOUBLE(number)

2. COMBIN: Calculates the number of combinations for a given number of items.

=COMBIN(n, k)

3. PERMUT: Calculates the number of permutations for a given number of items.

=PERMUT(n, k)

4. GAMMALN: Calculates the natural logarithm of the gamma function for a given number. The gamma function is a generalization of the factorial function for non-integer numbers.

=GAMMALN(number)

5. PRODUCT: Multiplies all the numbers given as arguments and returns the product. This function can be used as an alternative to the FACT function for calculating the factorial of a number by providing a range of numbers as arguments.

=PRODUCT(number1, [number2], …)

## Related

### It’s Time to Plan Your Tax Break: How to handle the “6-year rule”

The Individual Income Tax Law (“the IIT Law”) which took effect on 1st January 2019 introduced the “6-year-rule” to determine the tax residency status of

Read More »

### What You Need to Do Under the New PRC Company Law: Key changes and counter measures

The New PRC Company Law took effect on 1st July 2024, in which some new requirements were introduced for businesses operating in China. We summarized

Read More »
Did you find this article useful?

## About Aepoch Advisors

We are a boutique accounting and consulting firm servicing international businesses operating in China. We offers book keeping and business advisory service. We also help our clients select and implement SAAS business applications

Cloud technology significantly reduces cost foreign companies traditionally spent on tax compliance and ERP systems. Our cloud professionals can help with streamlining your management and controling structure, as well as advising you on how to reduce risks and maximize profits with software purposely built for Chinese business. Contact us today to learn more about our services.