# Fee.estimateMaxFeePerGas

Estimates a `maxFeePerGas` from a base fee, a priority tip, and a multiplier applied to the base fee:

```
maxFeePerGas = baseFeePerGas * multiplier + maxPriorityFeePerGas
```

The multiplier is supplied as `multiplierNumerator / multiplierDenominator` to keep the math in `bigint`. The default is `2 / 1` (i.e. 2x), matching the common wallet/relay heuristic for headroom against base-fee bumps.

## Imports

:::code-group
```ts [Named]
import { Fee } from 'ox'
```

```ts [Entrypoint]
import * as Fee from 'ox/Fee'
```
:::

## Examples

```ts twoslash
import { Fee } from 'ox'

Fee.estimateMaxFeePerGas({
  baseFeePerGas: 100n,
  maxPriorityFeePerGas: 5n
})
// @log: 205n

Fee.estimateMaxFeePerGas({
  baseFeePerGas: 100n,
  maxPriorityFeePerGas: 5n,
  multiplierNumerator: 3n,
  multiplierDenominator: 2n
})
// @log: 155n  (= 100n * 3n / 2n + 5n)
```

## Definition

```ts
function estimateMaxFeePerGas(
  args: {
    baseFeePerGas: bigint;
    maxPriorityFeePerGas: bigint;
    multiplierNumerator?: bigint | undefined;
    multiplierDenominator?: bigint | undefined;
},
): bigint
```

**Source:** [src/core/Fee.ts](https://github.com/wevm/ox/blob/main/src/core/Fee.ts#L238)

## Parameters

### args

* **Type:** `{
    baseFeePerGas: bigint;
    maxPriorityFeePerGas: bigint;
    multiplierNumerator?: bigint | undefined;
    multiplierDenominator?: bigint | undefined;
  }`

## Return Type

Suggested `maxFeePerGas`.

`bigint`
