---
title: How to Add Priority Fees to a Transaction
description:
  "Learn how to increase your transaction priority with priority fees on Solana."
---

A priority fee is an optional fee paid to increase the chance that the current
leader processes your transaction.

To add a priority fee to a transaction, invoke instructions from the
[Compute Budget Program](https://github.com/solana-program/compute-budget).

<CodeTabs storage="cookbook" flags="r">

```ts !! title="Kit" file=packages/docs-examples/cookbook/transactions/add-priority-fees/kit.ts#region=priority

```

```ts !! title="Legacy" file=packages/docs-examples/cookbook/transactions/add-priority-fees/legacy.ts#region=priority highlight=34-41

```

```rust !! title="Rust" file=packages/docs-examples/cookbook/transactions/add-priority-fees/rust/src/main.rs#region=priority

```

```py !! title="Python" file=packages/docs-examples/cookbook/transactions/add-priority-fees/python.py#region=priority

```

</CodeTabs>
