Skip to main content

Cycles cost formulas

Beginner
Concept

Canisters are charged for the resources they consume and any operations they perform using features such as HTTPS outcalls, threshold signatures, and the Bitcoin integration API. At a high level this can be visualized using the following diagram:

Canister calls overview

The cost of cycles is pegged to the value of XDR (Special Drawing Rights). Specifically, 1 trillion cycles = 1 XDR. As of May 22, 2025**, the exchange rate of XDR is 1 XDR = $1.354820 USD. However, this rate may fluctuate over time. For the latest rates, see the IMF’s official XDR exchange data.

The following table shows units of cycles and the respective fiat values:

AbbreviationNameIn numbersCycles XDR valueCycles USD value
TTrillion1_000_000_000_00011.354820
BBillion1_000_000_0000.0010.001354820
MMillion1_000_0000.0000010.000001354820
kThousand1_0000.0000000010.000000001354820

Cost calculation formulas

A detailed, mathematical example of how the cost of running a canister on a 13-node subnet is computed can be found on the wiki.

Specific mathematical formulas used to calculate various costs are provided below for reference.

Message transmissions

A fixed baseline fee and per-byte fee are charged for each byte of the message: base-fee + per-byte-fee * size-in-bytes.

Execution

The execution cost consists of a fixed execution fee and a per-instruction fee (on application subnets (13 nodes), 10 instructions cost 4 cycles) that is charged for each executed WebAssembly instruction:

base-fee + per-instruction-fee * number-of-instructions

The current values of fees are base-fee = 5M cycles (or $0.0000067741 USD), per-instruction-fee = 1 cycle (or $0.000541928 USD for 1B instructions).

HTTPS outcalls

The cycles cost of an HTTPS outcall request has both a fixed and variable component. The fixed component accounts for the known overhead associated with an HTTPS outcall, whereas the variable component accounts for the resources consumed during the request.

The cost scales with regard to subnet size, where n is the number of nodes on the subnet.

Currently, these fees are:

total_fee = base_fee + size_fee
base_fee = (3_000_000 + 60_000 * n) * n
size_fee = (400 * request_bytes + 800 * max_response_bytes) * n

The request_bytes includes the entire request, not just the HTTP body:

request_size = url.len + transform.name.len + transform.context.len + body.len + header_len
header_len = header_1.name + header_1.value + ... + header_n.name + header_n.value

max_response_bytes is either set by the canister or defaults to 2M.

Cycles price breakdown

The table below details the cost of compute, storage transmissions, and canister calls.

You can use the pricing calculator to estimate the cost for your dapp.

Canister transmissionDescriptionWho pays the cycles fee?13-node subnets cycles cost13-node subnets USD cost34-node subnets cycles cost34-node subnets USD cost
Query callQuery information from a canister.N/AFreeFreeFreeFree
Canister creationFor creating canisters on a subnet.Created canister500_000_000_000$0.6774100000001_307_692_307_692$1.771687692308
Compute percent allocated per secondReserved compute allocation per second.Canister with allocation10_000_000$0.00001354820026_153_846$0.000035433754
Update message executionFor every update message executed.Target canister5_000_000$0.00000677410013_076_923$0.000017716877
1B executed instructionsFor every 1B instructions executed.Executing canister1_000_000_000$0.0013548200002_615_384_615$0.003543375385
Xnet callInter-canister call: request + response.Sending canister260_000$0.000000352253680_000$0.000000921278
Xnet byte transmissionPer byte sent in inter-canister call.Sending canister1_000$0.0000000013552_615$0.000000003543
Ingress message receptionFor every ingress message received.Receiving canister1_200_000$0.0000016257843_138_461$0.000004252050
Ingress byte receptionFor every byte received in ingress message.Receiving canister2_000$0.0000000027105_230$0.000000007087
GiB storage per secondCost per GiB of storage per second.Canister with storage127_000$0.000000172062332_153$0.000000450009
HTTPS outcalls
HTTPS outcall (per call)Per HTTPS outcall sent to an external server.Sending canister49_140_000$0.000066575855171_360_000$0.000232161955
HTTPS outcall request message size (per byte)Per byte sent in HTTPS outcall request.Sending canister5_200$0.00000000704513_600$0.000000018426
HTTPS outcall response message size (per byte)Per reserved byte for HTTPS outcall response.Sending canister10_400$0.00000001409027_200$0.000000036851

The following table shows the calculated storage cost per GiB for a 30-day month:

13-node subnets34-node subnets
GiB Storage Per MonthFor storing a GiB of data per month$0.446150495$1.70