FACT Function in Excel

Part 1: Introduce

Definition

The FACT function in Microsoft Excel calculates the factorial of a given number.

Purpose

The factorial of a number represents the product of all positive integers up to that number. For instance, the factorial 5 is 5 x 4 x 3 x 2 x 1. The FACT function is used to determine the number of ways a group of distinct items can be arranged (also known as permutations).

Syntax & Arguments

syntax
FACT(number)

Explain the Arguments in the function

  • Number: This is a required argument. It represents the nonnegative number for which you want the factorial. If the number is not an integer, it is truncated.

Return value

The function returns the factorial of the provided number.

Remarks

  • The factorial of 0 is 1.
  • The FACT function returns an error value if a negative number is provided.

Part 2: Examples

Example 1: Factorial of 3

Purpose of Example: Calculate the factorial of 3.

  • Data Sheet and Formulas:

    ABC
    1NumberFormulaResult
    23=FACT(A2)6
    3
    4
  • Explanation: The formula =FACT(3) returns the factorial of 3, 3 x 2 x 1 = 6.


Example 2: Factorial of 4

Purpose of Example: Calculate the factorial of 4.

  • Data Sheet and Formulas:

    ABC
    1NumberFormulaResult
    24=FACT(A2)24
    3
    4
  • Explanation: The formula =FACT(4) returns the factorial of 4, which is 4 x 3 x 2 x 1 = 24.


Example 3: Factorial of 6

Purpose of Example: Calculate the factorial of 6.

  • Data Sheet and Formulas:

    ABC
    1NumberFormulaResult
    26=FACT(A2)720
    3
    4
  • Explanation: The formula =FACT(6) returns the factorial of 6, which is 6 x 5 x 4 x 3 x 2 x 1 = 720.


Example 4: Factorial of 0

Purpose of Example: Demonstrate that the factorial of 0 is 1.

  • Data Sheet and Formulas:

    ABC
    1NumberFormulaResult
    20=FACT(A2)1
    3
    4
  • Explanation: The formula =FACT(0) returns the factorial of 0, which is always 1.


Example 5: Factorial of a Decimal

Purpose of Example: Calculate the factorial of the integer part of 2.5.

  • Data Sheet and Formulas:

    ABC
    1NumberFormulaResult
    22.5=FACT(A2)2
    3
    4
  • Explanation: The formula =FACT(2.5) returns the factorial of the integer part 2.5, which is 2 x 1 = 2.

    Example 6: FACT with IF

    Purpose of Example: Determine if a number is less than 5 and then calculate its factorial.

    • Data Sheet and Formulas:

      ABC
      1NumberFormulaResult
      24=IF(A2<5, FACT(A2), "Too large")24
      36=IF(A3<5, FACT(A3), "Too large")Too large
      43=IF(A4<5, FACT(A4), "Too large")6
    • Explanation: The formula first checks if the number in column A is less than 5. If it is, it calculates the factorial of that number. If not, it returns “Too large”.


    Example 7: FACT with SUM

    Purpose of Example: Sum two numbers and then calculate the factorial of the result.

    • Data Sheet and Formulas:

      ABCD
      1Num1Num2FormulaResult
      212=FACT(SUM(A2:B2))6
      321=FACT(SUM(A3:B3))6
      402=FACT(SUM(A4:B4))2
    • Explanation: This formula sums the numbers in columns A and B, then calculates the sum’s factorial.


    Example 8: FACT with VLOOKUP

    Purpose of Example: Use VLOOKUP to find a number in a table and then calculate the factorial of the found number.

    • Data Sheet and Formulas:

      ABCD
      1KeyValueFormulaResult
      2“A”3=FACT(VLOOKUP("A", A2:B4, 2, FALSE))6
      3“B”2
      4“C”4
    • Explanation: The formula uses VLOOKUP to find the key “A” in the table and retrieves its corresponding value. It then calculates the factorial of the retrieved value.


    Example 9: FACT with AVERAGE

    Purpose of Example: Calculate the factorial of the average of a range of numbers.

    • Data Sheet and Formulas:

      ABC
      1NumberFormulaResult
      21=FACT(AVERAGE(A2:A4))2
      32
      43
    • Explanation: This formula calculates the average of the numbers in column A and then computes the factorial of the average.


    Example 10: FACT with MAX

    Purpose of Example: Find the maximum number in a range and then calculate the factorial of the maximum number.

    • Data Sheet and Formulas:

      ABC
      1NumberFormulaResult
      21=FACT(MAX(A2:A4))6
      32
      43
    • Explanation: The formula finds the maximum number in column A and then calculates the factorial of the maximum number.


    Example 11: FACT with MIN

    Purpose of Example: Determine the minimum number in a range and then compute the factorial of the minimum number.

    • Data Sheet and Formulas:

      ABC
      1NumberFormulaResult
      21=FACT(MIN(A2:A4))1
      32
      43
    • Explanation: This formula identifies the minimum number in column A and then computes the factorial of the minimum number.


    Example 12: FACT with ROUND

    Purpose of Example: Round a number to the nearest integer and then calculate the factorial of the rounded number.

    • Data Sheet and Formulas:

      ABC
      1NumberFormulaResult
      22.5=FACT(ROUND(A2, 0))6
      33.4=FACT(ROUND(A3, 0))6
      44.6=FACT(ROUND(A4, 0))120
    • Explanation: The formula rounds the numbers in column A to the nearest integer and then calculates the factorial of the rounded number.

     


Part 3: Tips and Tricks

  • Always ensure that the number provided as an argument is valid. Providing a negative number will result in an error.
  • The FACT function can be combined with other functions for more complex calculations.
  • Remember that the factorial of a number proliferates, so be cautious with large numbers to avoid extensive results.

Leave a Comment