Pay only for the Function Compute resources you use — no upfront commitment required. All billable items are converted to a unified unit called CU (Compute Unit), priced monthly on a tiered basis.
Prices
CU usage is billed monthly on a tiered basis.
| Tier | Monthly CU usage | Unit price | Discounted unit price (August 27, 2024 – August 27, 2025) |
|---|---|---|---|
| 1 | (0, 100 million] CU | USD 0.000020/CU | USD 0.0000160/CU |
| 2 | (100 million, 500 million] CU | USD 0.000017/CU | USD 0.0000136/CU |
| 3 | > 500 million CU | USD 0.000014/CU | USD 0.0000112/CU |
Tier | CU usage (Unit: CU) | Unit price | Discounted unit price Promotion period: August 27, 2024 to August 27, 2026 |
Tier 1 | (0, 200 million] | CNY 0.00011/CU | CNY 0.000088/CU |
Tier 2 | (200 million, 1 billion] | CNY 0.00010/CU | CNY 0.000080/CU |
Tier 3 | >1 billion | CNY 0.00009/CU | CNY 0.000072/CU |
How billing works
Conversion factors
All resource usage is converted to CU using this formula:
CU usage = Resource usage × CU conversion factor
| Billable item | Unit | CU conversion factor |
|---|---|---|
| Function invocations | CU/10,000 invocations | 75 |
| Active vCPU usage | CU/vCPU-second | 1 |
| Idle vCPU usage | CU/vCPU-second | 0 |
| Memory usage | CU/GB-second | 0.15 |
| Disk usage | CU/GB-second | 0.05 |
| Tesla series — active GPU usage | CU/GB-second | 2.1 |
| Tesla series — idle GPU usage | CU/GB-second | 0.5 |
| Ada series — active GPU usage | CU/GB-second | 1.5 |
| Ada series — idle GPU usage | CU/GB-second | 0.25 |
Idle vCPU usage has a conversion factor of 0, so idle CPU time is not billed. GPU idle time is billed at a reduced rate compared to active GPU time.
Billing granularity
The minimum billing increment depends on the instance type and mode.
| Instance type | On-demand mode | Provisioned mode |
|---|---|---|
| CPU-accelerated instances | Milliseconds | 10 seconds (partial tens rounded up to the nearest 10) |
| GPU-accelerated instances | 1 second (partial seconds rounded up) | — |
CPU-accelerated instances, provisioned mode examples:
51 seconds of execution → billed as 60 seconds
61 seconds of execution → billed as 70 seconds
GPU-accelerated instances, on-demand mode examples:
51 milliseconds of execution → billed as 1 second
10.5 seconds of execution → billed as 11 seconds
Calculation example
The following example shows how to estimate a monthly bill for a typical CPU-accelerated function workload.
Assumptions:
5 million invocations per month
Average execution duration: 200 ms per invocation
Memory: 0.5 GB per instance
vCPU: 0.5 vCPU per instance
Instance type: on-demand, CPU-accelerated
Step 1: Calculate CU from invocations
5,000,000 invocations ÷ 10,000 × 75 = 37,500 CUStep 2: Calculate CU from active vCPU usage
Total execution time = 5,000,000 × 0.2 s = 1,000,000 seconds
Active vCPU-seconds = 1,000,000 s × 0.5 vCPU = 500,000 vCPU-seconds
CU from vCPU = 500,000 × 1 = 500,000 CUStep 3: Calculate CU from memory usage
GB-seconds = 5,000,000 × 0.2 s × 0.5 GB = 500,000 GB-seconds
CU from memory = 500,000 × 0.15 = 75,000 CUStep 4: Total CU and cost
Total CU = 37,500 + 500,000 + 75,000 = 612,500 CU
Tier 1 (first 100 million CU): 612,500 × USD 0.000020 = USD 12.25Total estimated monthly cost: USD 12.25
This is an estimate. Actual costs depend on your function's exact execution duration, memory allocation, and invocation count.
Billing cycle
Bills are generated hourly. Each hour's bill is issued 1–2 hours after the hour ends.
Within each billing cycle:
CU usage for each function is measured and rounded up.
CU usage across all functions is summed to calculate the total fee.
Fees are automatically deducted from your account balance.
View detailed billing records in the Expenses and Costs console.
Key concepts
CU (Compute Unit) The unified billing unit for Function Compute. All resource usage — invocations, vCPU, memory, disk, and GPU — is converted to CU before pricing is applied.
On-demand mode Function Compute automatically allocates and releases instances. Billing starts when an instance begins executing a request and stops when the request completes.
Provisioned mode You allocate and release instances manually. Billing starts when Function Compute allocates the instance and stops when you release it.
In provisioned mode, charges apply as long as instances are allocated, even if they process no requests. Release provisioned instances promptly when they are no longer needed. For details, see Modify or delete a provisioned instance policy.
Idle mode An optional feature for elastic and GPU-accelerated instances. When idle mode is enabled, instances are classified as active (processing requests) or idle (not processing requests). Idle CPU time is not billed; idle GPU time is billed at a reduced rate.
Execution duration The period during which an instance runs. How it is measured depends on the instance mode:
On-demand: from the start of request execution to completion
Provisioned: from instance allocation to instance release
What's next
To reduce costs for predictable workloads, see Resource plans.
If charges continue after you stop services, see FAQ about billing — charges after stopping services.
If you need to cancel your subscription, see FAQ about billing — unsubscribing with an overdue payment.