> **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.effectiveGasPrice

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

Computes the effective gas price an EIP-1559 transaction will pay:

```
effective = min(maxFeePerGas, baseFeePerGas + maxPriorityFeePerGas)
```

## Imports

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

## Examples

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

Fee.effectiveGasPrice({
  baseFeePerGas: 100n,
  maxFeePerGas: 200n,
  maxPriorityFeePerGas: 50n
})
// @log: 150n  (= 100n + 50n)

Fee.effectiveGasPrice({
  baseFeePerGas: 100n,
  maxFeePerGas: 120n,
  maxPriorityFeePerGas: 50n
})
// @log: 120n  (capped at maxFeePerGas)
```

## Definition

```ts
function effectiveGasPrice(
  args: {
    baseFeePerGas: bigint;
    maxFeePerGas: bigint;
    maxPriorityFeePerGas: bigint;
},
): bigint
```

## Parameters

### args

* **Type:** `{
    baseFeePerGas: bigint;
    maxFeePerGas: bigint;
    maxPriorityFeePerGas: bigint;
  }`

## Return Type

Effective gas price (in wei).

`bigint`
