# How to use the FACT function

**What is the FACT function?**

The FACT function returns the factorial of a number.

**What is the factorial of a number?**

The factorial of a number n is the product of all positive integers less than or equal to n, and is represented by n!

The factorial of a number n is defined as:

n! = n * (n-1) * (n-2) * ... * 3 * 2 * 1

In other words, the factorial of a number n is the product of all positive integers less than or equal to n.

Some examples:

1! = 1

2! = 2 * 1 = 2

3! = 3 * 2 * 1 = 6

4! = 4 * 3 * 2 * 1 = 24

5! = 5 * 4 * 3 * 2 * 1 = 120

0! = 1

The factorial function grows very quickly as n increases. Factorials are useful in combinatorics for counting permutations and combinations.

**How to calculate combinations using factorials?**

The formula for combinations is:

C(n, r) = n! / (r! * (n-r)!)

Where:

n = Total number of objects

r = Size of the subset we choose

For example, say we have 5 fruits: apple, banana, orange, mango and peach. We want to calculate how many combinations of 3 fruits there are from this set of 5 fruits.

n = 5 (total fruits) r = 3 (size of subset)

C(5, 3) = 5! / (3! * (5-3)!) = 120 / (6 * 2) = 10

**How to calculate permutations using factorials?**

For example, ordering 3 letters out of the alphabet.

The formula for permutations is:

P(n, r) = n! / (n - r)!

Where:

n = Total number of objects

r = Number of objects being arranged

For example, say we want to find how many ways we can arrange 3 letters from the alphabet.

n = 26 (total letters) r = 3 (letters we are arranging)

P(26, 3) = 26! / (26 - 3)! = 26! / 23! = 15600

**What are permutations?**

A permutation is a way of arranging a set of elements in a specific order. For example, if you have three letters A, B, and C, you can arrange them in six different ways: ABC, ACB, BAC, BCA, CAB, and CBA.

Each of these arrangements is called a permutation of the three letters. The order of the objects matters in a permutation, so ABC and BAC are considered different permutations.

The PERMUT and PERMUTATIONA functions are in the StatisticalÂ category

**What are combinations?**

A combination is a way of selecting items from a collection where the order of selection does not matter.

For example, if you have three fruits, say an apple, an orange, and a pear. There are three combinations of two that can be drawn from this set:

- apple and a pear
- apple and an orange
- pear and an orange

The COMBIN and COMBINA functions are in the Math and trigonometry category.

Formula in cell C3:

Example, 3! = 3*2*1 = 6

#### Table of Contents

## 1. FACT Function Syntax

FACT(*number*)

## 2. FACT Function Arguments

number |
Required. The number equal to or larger than 0 (zero) for which you want to calculate the factorial. |

If *number* is not an integer, it is truncated.

Returns an error if the *numberÂ *argument is a text value.

## 3. FACT Function example

The FACT function is useful if you want to calculate the number of permutations of a given set of elements.

The following set has three elements: [A, B, C].

3! = 3*2*1 = 6. You can rearrange [A, B, C] in six different permutations.

1, [A, B, C]

2, [A, C, B]

3, [B, A, C]

4, [B, C, A]

5, [C, A, B]

6, [C, B, A]

### 'FACT' function examples

I discussed the difference between permutations and combinations in my last post, today I want to talk about two kinds […]

This article demonstrates a macro that lets you create a list of permutations, repetitions are allowed, based on a number […]

Today I have two functions I would like to demonstrate, they calculate all possible combinations from a cell range. What […]

### Functions in 'Math and trigonometry' category

The FACT function function is one of 73 functions in the 'Math and trigonometry' category.

## How to comment

How to add a formula to your comment<code>Insert your formula here.</code>

Convert less than and larger than signsUse html character entities instead of less than and larger than signs.

< becomes < and > becomes >

How to add VBA code to your comment[vb 1="vbnet" language=","]

Put your VBA code here.

[/vb]

How to add a picture to your comment:Upload picture to postimage.org or imgur

Paste image link to your comment.

Contact OscarYou can contact me through this contact form