Costs and expenses by nature (Details) - Cost Of Sale [Member] - USD ($) $ in Millions |
3 Months Ended | 6 Months Ended | ||
|---|---|---|---|---|
Jun. 30, 2026 |
Jun. 30, 2025 |
Jun. 30, 2026 |
Jun. 30, 2025 |
|
| IfrsStatementLineItems [Line Items] | ||||
| Raw material, products for resale, materials and third-party services (1) | $ (5,700) | $ (5,251) | $ (10,960) | $ (10,350) |
| Acquisitions (including imports) | (3,622) | (3,552) | (7,048) | (7,131) |
| Crude oil | (2,553) | (1,766) | (4,715) | (3,882) |
| Oil products | (800) | (1,586) | (1,905) | (2,775) |
| Natural gas | (269) | (200) | (428) | (474) |
| Third-party services and others | (2,078) | (1,699) | (3,912) | (3,219) |
| Depreciation, depletion and amortization | (3,543) | (3,004) | (6,900) | (5,517) |
| Production taxes | (4,607) | (2,555) | (8,063) | (5,358) |
| Employee compensation | (515) | (431) | (1,036) | (830) |
| Inventory turnover | 251 | 216 | 650 | 345 |
| Total | $ (14,114) | $ (11,025) | $ (26,309) | $ (21,710) |