Supported functions for formulas

This feature is currently available as a beta experience. Some functionality might not yet be available in your Jira space. Read more about what’s coming

Formula fields let you display calculated data directly on your Jira work items. Read more about formula fields and how to create one

You can create a formula using fields from your Jira space and any of the supported functions or operators listed below. If Rovo is enabled, you can use it to write formulas using natural language. Just select Generate formula when creating a custom field, or Fix formula to get suggestions for invalid formulas.

A formula can only run using data within a single work item. For example, a formula field on work item A can only calculate the sum of costs already shown on work item A. It can’t calculate costs across work items B and C, or any other work item.

How to write a formula

The format for writing a formula is FUNCTION_NAME(parameters) where FUNCTION_NAME is the name of the function being called, and parameters is a comma-separated list of parameters as inputs to the function.

The parameter list can include any combination of number field references, integers, or another expression which itself may include a function call. Fields can be referenced by enclosing them in curly brackets. For example, MIN({Project Cost}, 30 * MAX({Day Rate}, 100)

Supported functions for formulas

The following functions are supported for custom formula fields in Jira.

Number functions

Function

Description

Example

SUM

Calculates the result of adding values together.

Let’s say you have field1 with the value of 6 and field2 with the value of 10.

The formula SUM({field1}, {field2}) would return a value of 16.

AVG

Calculates the average of values.

Let’s say you have 3 fields: field1 has a value of 3, field2 has a value of 5, and field3 has a value of 7.

The formula AVG({field1}, {field2}, {field3}) would return a value of 5.

MAX

Returns the highest value from selected fields.

Let’s say you have field1 with a value of 20 and field2 with a value of 18.

The formula MAX({field1}, {field2}) would return a value of 20.

MIN (minimum)

Returns the lowest value from selected fields.

You have field1 with a value of 20 and field2 with a value of 18.

The formula MIN({field1}, {field2}) would return a value of 18.

DIV (divide)

Calculates the result of dividing values by other values.

Maybe you have field1 with a value of 6, and field2 with a value of 2.

The formula DIV({field1}, {field2}) would return a result of 3.

MULTIPLY

Calculates the result of multiplying a value by other values or specified numbers.

Maybe you have field1 with a value of 2, and field2 with a value of 3.

The formula MULTIPLY({field1}, {field2}) would return a result of 6.

MINUS

Calculates the result of subtracting values or specified numbers from a value.

Say you have field1 with a value of 12, and field2 with a value of 3.

The formula MINUS({field1}, {field2}) would return a result of 9.

POWER

Calculates a value raised to a specified power.

Maybe you have field1 with a value of 9, and you want it raised to the power of 1.5

The formula POWER({field1}, 1.5) would return a result of 27.

ROUND

Rounds a value to a specified number of decimal places.

Say you have field1 with a value of 35.7845, and you want it rounded to 3 decimal places.

The formula ROUND({field1}, 3) would return a result of 35.785.

ROUNDUP

Rounds a value up to a specified number of decimal places.

Say you have field1 with a value of 35.784, and you want it rounded up to 2 decimal places.

The formula ROUNDUP({field1}, 2) would return a result of 35.79.

ROUNDDOWN

Rounds a value down to a specified number of decimal places.

Say you have field1 with a value of 35.784, and you want it rounded down to 2 decimal places.

The formula ROUNDDOWN({field1}, 2) would return a result of 35.78.

FLOOR(number)

Rounds a value down to a specified multiple.

Let’s say you have field1 with a value of $8.8037 and you want to show it rounded down to the nearest multiple of 5 cents.

The formula FLOOR({field1}, 0.05) would return a result of $8.80

CEIL(number) (ceiling)

Rounds a value up to a specified multiple.

Let’s say you have field1 with a value of $8.8037 and you want to show it rounded up to the nearest multiple of 5 cents.

The formula CEIL({field1}, 0.05) would return a result of $8.85

ABS (absolute)

Calculates the absolute value (distance from 0) of a value.

You have field1 with a value of -8.

The formula ABS({field1}) would return a result of 8.

ODD

Rounds a value up to the nearest odd number.

Say you have field1 with a value of 35.784

The formula ODD({field1}) would return a result of 37.

EVEN

Rounds a value up to the nearest even number.

Say you have field1 with a value of 35.784

The formula EVEN({field1}) would return a result of 36.

SQRT

Calculates the square root of a value.

Say you have field1 with a value of 9.

The formula SQRT({field1}) would return a result of 3.

Text functions

Function

Description

Example

CONCATENATE

Combines specified text values into one new text value.

You have a work item where the summary field is “Q3 work item”.

The formula CONCATENATE({Summary}, " (important)") would result in the following output: “Q3 work item (important)”

LEFT

Returns the first character or a specified number of characters from the start of a text value.

You have a work item where the summary field is “Q3 work item”.

The formula LEFT({Summary}, 5) would result in the following output: “Q3 wo”

RIGHT

Returns the last character or a specified number of characters from the end of a text value.

You have a work item where the summary field is “Q3 work item”.

The formula RIGHT({Summary}, 5) would result in the following output: “ item”

REPLACE

Replaces text in a specific part of a text value.

You have a work item where the summary is “Q3 work item”.

The formula REPLACE({Summary}, "Q3", "Q4") would result in the following output: “Q4 work item”

TRIM

Removes all spacing in a text value except for single spaces between words.

You have a work item where the summary is “ Badly formatted work item with r a n d o m spaces “

The formula TRIM({Summary}) would result in the following output: “Badly formatted work item with r a n d o m spaces“

TEXT_CONTAINS

Returns TRUE or FALSE depending on whether a text value contains or doesn’t contain specified text.

You have a work item where the summary is “Q3 work item”.

The formula TEXT_CONTAINS({Summary}, "work") would result in the following output: “TRUE”

JOIN

Combines text values into one new text value, separated by a specified character.

The formula JOIN(",", "VIC", "NSW", "QLD") would result in the following output: “VIC,NSW,QLD”

LOWER

Converts all letters in a text value from uppercase to lowercase.

You have a work item where the summary is “Q3 work item”.

The formula LOWER({Summary}) would result in the following output: “q3 work item”

UPPER

Converts all letters in a text value from lowercase to uppercase.

You have a work item where the summary is “Q3 work item”.

The formula UPPER({Summary}) would result in the following output: “Q3 WORK ITEM”

LEN (length)

Returns the number of characters in a text value.

You have a work item where the summary is “Q3 work item”.

The formula LENGTH({Summary}) would result in the following output: 12

TEXT

Converts a number value into a text value.

You have a work item where there is a Number field 1 with a value of -10.

The formula TEXT({Number field 1}) would result in the following output: 10

Date and time functions

Function

Description

Example

FORMAT_DATE

Converts a date value to a specified format.

Formula

FORMAT_DATE({Date field}, "dd/MM/yyyy")

Reference field values:

  • {Date field} - 2026-01-12

Expected output: “12/01/2026“

DATETIME_FORMAT

Converts a date value to a specified format and timezone.

Formula

FORMAT_DATE({Datetime field}, "dd/MM/yy hh:mm a", "Australia/Melbourne")

Reference field values:

  • {Datetime field} - 2026-01-12 12:34:56 (note: time in UTC)

Expected output: “12/01/26 11:34:56 PM“ (using +11 hour offset for Melbourne summer/daylight savings time)

HOURS_DIFF

Returns the number of hours between two times.

Formula

HOURS_DIFF({Datetime field 1}, {Datetime field 2})

Reference field values:

  • {Datetime field 1} - 2026-01-12 12:00:00

  • {Datetime field 2} - 2026-01-11 13:45:00

Expected output: 22.25

MINUTES_DIFF

Returns the number of minutes between two times.

Formula

MINUTES_DIFF({Datetime field 1}, {Datetime field 2})

Reference field values:

  • {Datetime field 1} - 2026-01-12 12:00:00

  • {Datetime field 2} - 2026-01-11 13:45:00

Expected output: 1,335

SECONDS_DIFF

Returns the number of seconds between two times.

Formula

MINUTES_DIFF({Datetime field 1}, {Datetime field 2})

Reference field values:

  • {Datetime field 1} - 2026-01-12 12:00:00

  • {Datetime field 2} - 2026-01-11 13:45:00

Expected output: 80,100

WORKDAY_DIFF

Returns the number of weekdays between two days.

Formula

WORKDAY_DIFF({Date field 1}, {Date field 2})

Reference field values:

  • {Date field 1} - 2026-01-08 (Thursday)

  • {Date field 2} - 2026-01-13 (Tuesday)

Expected output: 3

Exclusive of start date, inclusive of end date.

ADD_WORKDAY

Adds a specified number of weekdays to a date value.

Formula

ADD_WORKDAY({Date field}, 5)

Reference field values:

  • {Date field} - 2026-01-08 (Thursday)

Expected output: 2026-01-15 (Thursday)

YEAR

Converts the year from a date value into a number value.

 

Formula

YEAR({Datetime field}, "America/New York")

Reference field values:

  • {Datetime field} - 2026-01-08 00:00:00 (Note: UTC time)

Expected output: 2026

MONTH

Converts the month from a date into a number value.

Formula

MONTH({Datetime field}, "America/New York")

Reference field values:

  • {Datetime field} - 2026-01-08 00:00:00 (Note: UTC time)

Expected output: 1

1 for January.

DAY

Converts the day from a date into a number value.

Formula

DAY({Datetime field}, "America/New York")

Reference field values:

  • {Datetime field} - 2026-01-08 00:00:00 (Note: UTC time)

Expected output: 7 (note: when transforming the datetime value to the specified time zone of “America/New York”, the local time representation of that datetime would be 2026-01-07 19:00:00 (-5 hours offset) - taking the “day” value of this datetime gives the value of 7)

7 for January 7th

HOUR

Converts the hours from a time into a number value.

Formula

HOUR({Datetime field}, "Australia/Adelaide")

Reference field values:

  • {Datetime field} - 2026-01-08 00:00:00 (Note: UTC time)

Expected output: 1

1st hour of the day

MINUTE

Converts the minutes from a time into a number value.

Formula

MINUTE({Datetime field}, "Australia/Adelaide")

Reference field values:

  • {Datetime field} - 2026-01-08 00:00:00 (Note: UTC time)

Expected output: 30

30th minute of the hour

SECOND

Converts the seconds from a time into a number value.

Formula

SECOND({Datetime field})

Reference field values:

  • {Datetime field} - 2026-01-08 00:00:00 (Note: UTC time)

Expected output: 30

30th second of the minute

DATE

Converts numbers into a date value.

Formula

DATE(2026, 1, 12)

Expected output: 2026-01-12

DATEADD

Adds a specified number of days to a date value.

Formula

ADD_DATE({Date field}, 5)

Reference field values:

  • {Date field} - 2026-01-15

Expected output: 2026-01-20

IS_AFTER

Returns TRUE or FALSE depending on whether a date or datetime value does or doesn’t occur after a specified date or datetime.

Formula

IS_AFTER({Date field 1}, {Date field 2})

Reference field values:

  • {Date field 1} - 2026-01-16

  • {Date field 2} - 2026-01-15

Expected output: TRUE

IS_BEFORE

Returns TRUE or FALSE depending on whether a date or datetime value does or doesn’t occur before a specified date or datetime.

Formula

IS_BEFORE({Date field 1}, {Date field 2})

Reference field values:

  • {Date field 1} - 2026-01-16

  • {Date field 2} - 2026-01-15

Expected output: FALSE

DATETIME

Returns a specific point in time from the year, month, day, time, and timezone you provide.

Formula

IS_AFTER({Datetime field}, DATETIME(2026, 1, 8, 0, 0, 0, "America/New York"))

Reference field values:

  • {Datetime field} - 2026-01-08 00:00:00 (Note: UTC time)

Expected output: FALSE - DATETIME(2026, 1, 8, 0, 0, 0, "America/New York")) is equivalent to 2026-01-07 19:00:00 in UTC time.

DATETIME_TO_DATE

Returns the date from a point in time in a specified timezone.

Formula

DATETIME_TO_DATE({Datetime field}, "America/New York"))

Reference field values:

  • {Datetime field} - 2026-01-08 00:00:00 (Note: UTC time)

Expected output: 2026-01-07 - 2026-01-08 00:00:00 in UTC time is 2026-01-07 19:00:00 in New York time.

Duration functions

Function

Description

Example

DATETIME_DIFF

Returns the number of seconds between two times.

Formula

DATETIME_DIFF({Datetime field 1}, {Datetime field 2})

Reference field values:

  • {Datetime field 1} - 2026-01-11 13:45:00

  • {Datetime field 2} - 2026-01-12 12:00:00

Expected output: 80,100

DATE_DIFF

Returns the number of seconds between two dates.

Formula

DATE_DIFF({Date field 1}, {Date field 2})

Reference field values:

  • {Date field 1} - 2026-01-11

  • {Date field 2} - 2026-01-12

Expected output: 86,400

DAY_DIFF

Returns the number of days between two dates.

Formula

DAY_DIFF({Date field 1}, {Date field 2})

Reference field values:

  • {Date field 1} - 2026-01-08 (Thursday)

  • {Date field 2} - 2026-01-13 (Tuesday)

Expected output: 5

Exclusive of start date, inclusive of end date.

TO_DURATION

Converts a specified number of a time unit into seconds.

Formula

TO_SECONDS({Number field}, "weeks")

Reference field values:

  • {Number field} - 4

Expected output: 2,419,200

Supported operators for formulas

The following operators are supported for formula fields in Jira.

Mathematical operators

  • + for addition

  • - for subtraction

  • * for multiplication

  • / for division

  • ^ for exponentiation (e.g. raising one number to the power of another)

Conditional operators

  • = is equal to

  • != is not equal to

  • > is greater than

  • < is less than

  • >= is greater than or equal to

  • <= is less than or equal to

  • IF returns different results based on whether a value meets or fails specified criteria

  • AND returns TRUE or FALSE depending on whether a value meets or fails all specified criteria

  • OR returns TRUE if a value meets at least one of the specified criteria, or FALSE if it doesn’t meet any

  • NOT returns TRUE if a value doesn’t meet the specified criteria, or FALSE if it does

  • IS_NONE checks whether a referenced field or value is NONE or otherwise empty, enabling formulas to still return a result

 

Still need help?

The Atlassian Community is here for you.