Skip to content

Learn

Risk & Position Sizing

How to calculate funding payments on a perpetual position

By the end of this page you will be able to compute the funding a perpetual position paid or received at each settlement, total it over a holding period, and reconcile your figure against the venue’s own record to the cent. The method is the same on every venue that uses periodic funding; what differs is the settlement interval, the reference price and any caps, and those are treated as inputs here rather than assumed.

If you want the background on why funding exists at all, start with what is a funding rate or perpetuals vs dated futures. This page is the arithmetic.

Before you start

You need four things for each settlement you held through:

  • Position size in contracts or base units, and its direction.
  • The reference price the venue uses to value the position at settlement.
  • The settled funding rate for that settlement — not the predicted rate for the next one.
  • The settlement interval, so you know how many settlements fell inside your holding period.

It costs nothing but a spreadsheet or a few lines of code. The formula:

funding payment = position notional × funding rate
position notional = |position size| × reference price

positive rate → longs pay shorts
negative rate → shorts pay longs

Step 1: Find your venue’s settlement interval

Funding is paid per settlement, and the interval between settlements is set by the venue and may vary by instrument. Do not assume it. Call it N hours; a venue settling every N hours has 24 ÷ N settlements a day.

The interval changes the total a lot. With the same illustrative rate of 0.01% per settlement on 30,000 USD of notional:

Illustrative intervalSettlements per dayCost per dayCost over 7 days
Every 8 hours39.00 USD63.00 USD
Every 4 hours618.00 USD126.00 USD
Every 1 hour2472.00 USD504.00 USD

These intervals illustrate the arithmetic; they are not a statement about any particular venue. The venue calculator pages — Binance futures, Bybit, OKX and Hyperliquid — cover each venue’s schedule, reference price and rate limits.

Step 2: Compute the notional at each settlement

Notional is position size times the reference price at the settlement moment, not at your entry. As price moves, so does the notional the rate is applied to.

Which reference price is used — a mark price, an index price or something else — is defined by each venue. Use the one your venue’s documentation names; the difference is small per settlement but it is the usual source of rounding-level mismatches in Step 7. For more on the term itself, see what is notional value.

Step 3: Read the settled rate and convert it

Venues display funding as a percentage. Convert before multiplying:

0.01%  → 0.0001
-0.002% → -0.00002

Use the rate that actually settled. Interfaces often also show a predicted or estimated rate for the next settlement, which moves until the settlement happens and is not what you paid.

Step 4: Apply the formula and the sign

A long position of 0.5 units, reference price 60,000, settled rate +0.01% — illustrative figures:

notional = 0.5 × 60,000 = 30,000 USD
payment  = 30,000 × 0.0001 = 3.00 USD

The rate is positive, so the long pays 3.00 and a short of the same size receives 3.00. At a rate of −0.005% the long would receive 1.50 instead.

As code:

def funding_payment(qty, ref_price, rate_pct, side):
    """Positive = you pay. Negative = you receive."""
    notional = abs(qty) * ref_price
    payment = notional * rate_pct / 100
    return payment if side == "long" else -payment

Step 5: Build a ledger across settlements

Hold the same long through six settlements, with the reference price and the rate both changing. All figures illustrative:

SettlementReference priceNotionalRateLong pays (+) / receives (−)
160,00030,000.00+0.0100%+3.0000
260,45030,225.00+0.0120%+3.6270
361,20030,600.00+0.0080%+2.4480
460,80030,400.00−0.0020%−0.6080
559,90029,950.00+0.0050%+1.4975
660,30030,150.00+0.0150%+4.5225
Total+14.4870

The long paid a net 14.49 USD; the opposite short received it. One negative settlement reduced the total but did not reverse it.

Where funding settles at discrete timestamps, what counts is whether the position was open at each settlement, not how long it was open in between. Check how your venue defines this before counting settlements for a position opened or closed close to one.

Step 6: Put it next to your margin

Funding is charged on notional; your margin is a fraction of notional. At 10×, the example posts 3,000 USD of margin, so the first 3.00 USD payment is 0.1% of margin in one settlement — ten times the headline rate.

Paid funding is deducted from margin, which moves liquidation toward entry over a long hold. The liquidation price calculator does not model this; subtract expected funding from margin yourself before judging the distance. To see what a rate means over a year rather than per settlement, see annualised funding cost.

Step 7: How to tell it worked

Export the venue’s funding history for the position — usually a series of funding entries in the transaction or wallet log — and compare it line by line with your ledger. A correct ledger matches each entry to rounding.

If it does not, the size of the mismatch usually tells you why:

Your figure vs the venueLikely cause
100× too largeRate used as a percentage, not a decimal
Too small by your leverage multipleRate applied to margin instead of notional
Right size, wrong signSign convention reversed for your side
Off by a small fractionWrong reference price, or entry price used
Extra or missing entriesInterval assumed wrong, or position not open at a settlement

The funding rate calculator reproduces the per-settlement arithmetic if you want a second check on one line. For a general approach to matching your own records against the venue’s, see position reconciliation.

What usually goes wrong

  1. Assuming an interval. Intervals differ by venue and may differ by instrument. A ledger built on the wrong interval is wrong by a whole multiple.
  2. Using entry-price notional throughout. Fine for a quick estimate, wrong for reconciliation once price has moved.
  3. Using the predicted rate. It is a forecast of the next settlement that changes until the settlement happens.
  4. Forgetting funding in PnL. Realised PnL on the trade and funding are often reported separately; your net result needs both. See how to calculate futures PnL.
  5. Projecting one rate forward. The rate resets every settlement; a 30-day projection from today’s print is a model, not a forecast.

FAQ

How is a funding payment calculated?

Multiply the position’s notional — size times the venue’s reference price at the settlement — by the settled funding rate for that settlement. If the rate is positive, longs pay that amount and shorts receive it; if negative, the flow reverses. Repeat for each settlement the position was open for and sum the results.

Is funding charged on margin or on notional?

On notional, the full position value. A leveraged position therefore pays funding that is much larger relative to its margin than the headline rate suggests — at 10×, a rate of 0.01% is 0.1% of the margin posted, every settlement.

Why does my calculated funding not match the exchange?

The most common causes are using the rate as a percentage instead of a decimal, applying it to margin instead of notional, using entry price instead of the reference price at settlement, or assuming the wrong settlement interval. Compare line by line against the venue’s funding history; the size of the gap usually identifies which one it is.

Do I pay funding if I close before the settlement?

Where funding settles at discrete timestamps, a position closed before a settlement does not take part in that settlement. How each venue defines “open at settlement” is venue-specific, so check its documentation for positions opened or closed near the boundary.