Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdataprime%2Flanguage-reference%2Ffunctions-reference%2Ftime%2Fmultiplyinterval.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdataprime%2Flanguage-reference%2Ffunctions-reference%2Ftime%2Fmultiplyinterval.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)

# `multiplyInterval`

## Description

Returns an interval multiplied by a numeric factor, allowing extrapolation over time.

Note

Both integer and decimal factors are supported.

## Syntax

Like many functions in DataPrime, `multiplyInterval` supports<!-- --> [two notations](https://docs-docusaurus.kinsta.page/dataprime/language-reference/functions-reference/.md),<!-- --> **function** and **method**. These interchangeable forms allow flexibility in how you structure expressions.

* Function notation
* Method notation

```
multiplyInterval(i: interval, factor: number): interval
```

```
(i: interval).multiplyInterval(factor: number): interval
```

## Arguments

| Name     | Type       | Required | Description                             |
| -------- | ---------- | -------- | --------------------------------------- |
| `i`      | `interval` | **true** | The interval to multiply                |
| `factor` | `number`   | **true** | The multiplier to apply to the interval |

## Example

**Use case: Estimate total processing time for queued jobs**

A document tracks how many jobs remain in the queue and the average time per job in seconds. Multiply the per-job interval by the number of jobs to calculate the total wait time.

```
{

    "jobs_in_queue": 25,

    "time_per_job_seconds": 30

}
```

### Example query

* Function notation
* Method notation

```
create overall_wait_time from toInterval(time_per_job_seconds, 's').multiplyInterval(jobs_in_queue)
```

```
create overall_wait_time from time_per_job_seconds.toInterval('s').multiplyInterval(jobs_in_queue)
```

### Example output

```
{

    "jobs_in_queue": 25,

    "time_per_job_seconds": 30,

    "overall_wait_time": "12m30s"

}
```
