☰ Menu

Calculating the Cycle Time of a Deal

Last update: May 29, 2026


Let’s create a Calculated Field that calculates the Cycle Time of a Deal. 

Note: The App you create this Calculated Field in can vary based on your servis.ai setup. We are using the Deals App for our example but a Leads or Projects App works just as well.

To begin, we will need the following fields in the Deals App:

  •  Start Date- A Date Field that contains the date the deal record was created.
  •  Close Date- A Date Field that contains the date the deal record was marked as Closed.

See How to create a new form field for more. 

Begin by naming the Calculated Field and selecting what Section of the Deals App the Calculated Field will be displayed in (the choices will depend on your setup).

Next, click the Show Advanced Settings box and change the Calculated field to Yes. 

Now, select the script Calculation Type. Enter the following code snippet into the Script window:

(function(deal){

var StartDate = Date.parse(deal.created);

var EndDate = Date.parse(deal.closeDate);

if(!EndDate){

return 0;

}
var timeBetween = EndDate - StartDate;

var days = timeBetween / (24 * 60 * 60 * 1000);

var justDays = parseInt(days);

return justDays;

}(deal));

Picture of Manuel Saucedo
Manuel Saucedo

Technical Writer

🙄

😐

😊

😍

0

In this article:

✖

Select a meeting date

Powered by servis.ai

Get Started with servis.ai

30-minute demo where you see servis.ai in action.

Unlock the essential servis.ai features at no cost.

servis-logo

How can I be of servis?

How can I be of servis? ✖