# Calculated profit factor

## Configuration

To configure the calculated profit factor the feature for this must be enabled. The feature is listed in the Modules section under Setup / Settings / General.

<figure><img src="/files/BjroPaqRVxKts1W11NDd" alt=""><figcaption></figcaption></figure>

By activating the feature (remember to save), a new menu item will be available in the left panel in Setup / Settings / Projects.&#x20;

<figure><img src="/files/UGORyOIe30UkkiuJ91yb" alt=""><figcaption></figcaption></figure>

Select "Calculated" and save this selection to get started.

## Visualization

The profit factor is shown in a few places when this has been done.

#### Project

On the project main page, the profit factor is shown at the bottom of the first left section. The value is shown as - if not yet calculated or a number when calculated. To calculate it on demand, click on the calculator icon next to the value.

<figure><img src="/files/3nc3JJYIfqqjxjfJ8t3c" alt=""><figcaption></figcaption></figure>

#### Project Report

In the project report, there is the option to enable/show a column with the calculated profit factor. The value shown is the latest calculated value.

<figure><img src="/files/luiEO71MDX993PcSF7sY" alt=""><figcaption></figcaption></figure>

## Calculation

The triggering of the calculation of the profit factor is done in a few different ways. All of these will calculate in the same way.

* On demand\
  The calculation can be done at any time from the main page of the project by clicking the afore mentioned calculator icon.
* For all projects\
  All projects can be calculated at once using a tool. The tool is located under Setup / Tools / Main. \
  The section named "Set all project in company" is used for this purpose. Click on "Run" to execute the calculations.<br>

  <figure><img src="/files/CBkthbq6mczzuljUOn82" alt=""><figcaption></figcaption></figure>
* Scheduled\
  In addition to these two manual methods of calculation, there is an automated solution in place that is running on a scheduler. This is executed once per day, at midnight, at this time all projects will be updated based on any new registrations of hours or expenses made during the day.&#x20;

## Values calculated

The data taken into account when calculating the profit factor are the hours registered in the project, and the expenses registered in the project that are linked to a supplier.&#x20;

The calculation uses the summarized values for each of hours invoice value and cost as well as expense value.

### Hours

For each hour registered, the hourly rate is multiplied with time registered. The total of this is *HoursTotalValue*.

For each hour registered, the total cost is multiplied with time registered. The total of this is *HoursTotalCost*.

### Expenses

All supplier expenses summed up is *SupplierExpenseTotalValue*.

### Formula

To get the profit factor these values are calculated using this formula:

$$
HoursTotalValue - SupplierExpenseTotalValue / HoursTotalCost
$$


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.milientsoftware.com/help/projects/profit-factor/calculated-profit-factor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
