> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# Fee.estimateMaxFeePerGas

:::info
`Fee.estimateMaxFeePerGas` is a re-export of ox's [`Fee.estimateMaxFeePerGas`](https://oxlib.sh/api/Fee/estimateMaxFeePerGas). Refer to the ox documentation for the full reference.
:::

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

```ts
import { Fee } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { Fee } from 'viem/utils'

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
```

## Parameters

### args

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

## Return Type

Suggested `maxFeePerGas`.

`bigint`
