# `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://coralogix.com/docs/dataprime/language-reference/functions-reference/index.md), **function** and **method** notation. These interchangeable forms allow flexibility in how you structure expressions.

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

```dataprime
(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.

```json
{
    "jobs_in_queue": 25,
    "time_per_job_seconds": 30
}
```

### Example query

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

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

### Example output

```json
{
    "jobs_in_queue": 25,
    "time_per_job_seconds": 30,
    "overall_wait_time": "12m30s"
}
```
