---
title: Number Filters
description: Filter operators for integer, approximate-number, fixed-decimal, and bigint scalars
icon: hash
---

## Operators

| Operator | Description |
|----------|-------------|
| `equals` | Exact match |
| `not` | Not equal |
| `in` | Match any in array |
| `notIn` | Match none in array |
| `lt` | Less than |
| `lte` | Less than or equal |
| `gt` | Greater than |
| `gte` | Greater than or equal |

`equals`, `not`, `in`, and `notIn` work the same on every scalar type — see [Filtering](/docs/client/filtering).

Decimal operands accept `Decimal` or string inputs and validate them
against the field's `{ precision, scale }` descriptor. Comparisons and ordering
stay exact on SQLite because the stored value is a scaled integer coefficient;
no decimal path casts through `REAL`.

## Comparisons

```ts
// Less than
where: { age: { lt: 18 } }

// Less than or equal
where: { age: { lte: 17 } }

// Greater than
where: { age: { gt: 65 } }

// Greater than or equal
where: { age: { gte: 21 } }
```

## Range Queries

Combine operators for ranges:

```ts
// Between 18 and 65 (inclusive)
where: {
  age: {
    gte: 18,
    lte: 65,
  },
}

// Greater than 100 but not 200
where: {
  price: {
    gt: 100,
    not: 200,
  },
}
```

## BigInt

BigInt uses the same operators with `bigint` values:

```ts
where: { viewCount: { gte: 1000000n } }
where: { id: { in: [1n, 2n, 3n] } }
```

## Examples

### Price Range

```ts
async function getProductsInRange(min: number, max: number) {
  return client.product.findMany({
    where: {
      price: {
        gte: min,
        lte: max,
      },
    },
    orderBy: { price: "asc" },
  });
}
```
