{"id":16164049,"url":"https://github.com/cyclenerd/google-cloud-pricing-cost-calculator","last_synced_at":"2025-08-21T01:32:19.779Z","repository":{"id":37673705,"uuid":"457365293","full_name":"Cyclenerd/google-cloud-pricing-cost-calculator","owner":"Cyclenerd","description":"💸 Calculate estimated monthly costs of Google Cloud Platform products and resources via YAML files and CLI program (Linux, macOS, Windows)","archived":false,"fork":false,"pushed_at":"2025-08-11T16:19:13.000Z","size":23596,"stargazers_count":183,"open_issues_count":36,"forks_count":36,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-11T18:26:40.366Z","etag":null,"topics":["billing","cloud","cloud-cost-estimates","compute-engine","cost-estimation","cost-management","cost-optimization","finops","gcp","google-cloud","google-cloud-platform","google-compute-engine","google-compute-instance","infrastructure","infrastructure-as-code","invoice","linux-cli","linux-shell","macos-cli","usage"],"latest_commit_sha":null,"homepage":"https://gcloud-compute.com/gcosts.html","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cyclenerd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"Cyclenerd"}},"created_at":"2022-02-09T13:15:00.000Z","updated_at":"2025-08-11T16:19:10.000Z","dependencies_parsed_at":"2023-10-20T19:09:28.668Z","dependency_job_id":"35d7dbda-98c6-4a26-a8d4-193532333325","html_url":"https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator","commit_stats":{"total_commits":1092,"total_committers":6,"mean_commits":182.0,"dds":"0.29670329670329665","last_synced_commit":"282d2fb77561de2fca13c26fd33abaf7b0aa93d4"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/Cyclenerd/google-cloud-pricing-cost-calculator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyclenerd%2Fgoogle-cloud-pricing-cost-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyclenerd%2Fgoogle-cloud-pricing-cost-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyclenerd%2Fgoogle-cloud-pricing-cost-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyclenerd%2Fgoogle-cloud-pricing-cost-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cyclenerd","download_url":"https://codeload.github.com/Cyclenerd/google-cloud-pricing-cost-calculator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cyclenerd%2Fgoogle-cloud-pricing-cost-calculator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271415033,"owners_count":24755628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["billing","cloud","cloud-cost-estimates","compute-engine","cost-estimation","cost-management","cost-optimization","finops","gcp","google-cloud","google-cloud-platform","google-compute-engine","google-compute-instance","infrastructure","infrastructure-as-code","invoice","linux-cli","linux-shell","macos-cli","usage"],"created_at":"2024-10-10T02:45:03.230Z","updated_at":"2025-08-21T01:32:19.774Z","avatar_url":"https://github.com/Cyclenerd.png","language":"Go","funding_links":["https://github.com/sponsors/Cyclenerd"],"categories":[],"sub_categories":[],"readme":"# Google Cloud Platform Pricing and Cost Calculator\n\n[![Badge: Google Cloud](https://img.shields.io/badge/Google%20Cloud-%234285F4.svg?logo=google-cloud\u0026logoColor=white)](#readme)\n[![Badge: Linux](https://img.shields.io/badge/Linux-FCC624.svg?logo=linux\u0026logoColor=black)](#-quick-start)\n[![Badge: macOS](https://img.shields.io/badge/macOS-000000.svg?logo=apple\u0026logoColor=white)](#-quick-start)\n[![Badge: Windows](https://img.shields.io/badge/Windows-008080.svg?logoColor=white)](#-quick-start)\n[![Badge: Go](https://img.shields.io/badge/Go-%2300ADD8.svg?logo=go\u0026logoColor=white)](#readme)\n[![Go Report Card](https://goreportcard.com/badge/github.com/Cyclenerd/google-cloud-pricing-cost-calculator/gcosts)](https://goreportcard.com/report/github.com/Cyclenerd/google-cloud-pricing-cost-calculator/gcosts)\n[![Badge: CI](https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/actions/workflows/test.yml/badge.svg)](https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/actions/workflows/test.yml)\n[![Badge: GitHub](https://img.shields.io/github/license/cyclenerd/google-cloud-pricing-cost-calculator)](https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/blob/master/LICENSE)\n[![Badge: Downloads](https://img.shields.io/github/downloads/Cyclenerd/google-cloud-pricing-cost-calculator/total)](https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/releases)\n\n| 🏆 Awarded |\n|------------|\n| This project was the winner of the [Google Open Source Peer Bonus](https://opensource.googleblog.com/2022/09/announcing-the-second-group-of-open-source-peer-bonus-winners-in-2022.html) in 2022 🥳 |\n\nCalculate estimated monthly costs of Google Cloud Platform products and resources.\nOptimized for DevOps, architects and engineers to quickly see a cost breakdown and compare different options upfront:\n\n* Mapping of resource usage is done in easy to learn **YAML** usage files\n* Price information is read from a local file (`pricing.yml`)\n* Calculation is done via `gcosts` **CLI** program\n* Calculated costs are saved in **CSV** file optimized for non-technical audience\n\nFull control and no disclosure of any information and costs to third parties.\nEverything is calculated on your local computer.\nNo need to have a connection to the Internet.\nEverything tested and matched against the actual invoice in large Google Cloud migration projects.\nOver **493 automated tests** ensure `gcosts` reliability.\n`gcosts` works on various OS and terminals, including Windows CMD, macOS iTerm2, and in CI systems like GitHub Actions.\n\n| 1️⃣ Create YAML file | 2️⃣ Run `gcosts` CLI program | 3️⃣ Open CSV file |\n|---------------------|-----------------------------|------------------|\n| ![Screenshot: YAML usage file](./img/usage.png) | ![Screenshot: gcosts CLI program](./img/gcosts.png) | ![Screenshot: CSV file](./img/csv.png) |\n\n\n## ☁️ Supported resources\n\nThe cost of a resource is calculated by multiplying its price by its usage.\n\n| 💡 Google Cloud Free Program |\n|------------------------------------------------|\n| Free tiers and free trial (90-day, $300), which are usually not a significant part of cloud costs, are ignored. For example: 1x free non-preemptible `e2-micro` VM instance per month, free NAT for 32 VMs, 30 GB-months standard persistent disk, 1 GB network egress and everything [else](https://cloud.google.com/free/docs/gcp-free-tier/#compute) are not taken into account. |\n\nResources that `gcosts` supports, and Google charges for:\n\n\u003cdetails\u003e\n\u003csummary\u003e🖥️ \u003cb\u003eCompute Engine Instances\u003c/b\u003e\u003c/summary\u003e\n\n- [x] All machine types are supported\n\t- [x] `A2` and `G2` accelerator optimized machines\n\t- [x] `C2`, `C2D` and `H3` compute optimized machine series \n\t- [x] `M1`, `M2`, `M3` and `M4` memory optimized machine series \n\t- [x] `C3`, `C3D`, `C4`, `C4A`, `C4D`, `E2`, `N1`, `N2`, `N4`, `N2D`, `T2D` and `T2A` general purpose machine series \n- [x] Sustained use discounts (SUD) are applied to monthly costs\n- [x] Spot provisioning model (Spot VM) is supported\n- [ ] Flexible committed use discounts (Flexible CUD) are not supported\n- [x] 1 year and 3 year committed use discounts (CUD) are supported\n- [x] Paid \"premium\" operating system licenses (paid images) are supported\n\t- [x] SUSE Linux Enterprise Server\n\t- [x] SLES for SAP (1y and 3y committed use discounts (CUD) are also supported)\n\t- [x] Red Hat Enterprise Linux (1y and 3y committed use discounts (CUD) are also supported)\n\t- [x] RHEL for SAP (1y and 3y committed use discounts (CUD) are also supported)\n\t- [x] Windows Server\n- [x] Custom machine types are supported (have to be created manually)\n- [ ] Sole-tenant VMs are not supported\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e💾 \u003cb\u003eCompute Engine Disks\u003c/b\u003e\u003c/summary\u003e\n\n- [x] All persistent disk (PD) types are supported\n\t- [x] Zonal persistent disk\n\t- [x] Regional persistent disk\n\t- [x] Local SSD\n\t- [ ] Provisioned IOPS\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e🪣 \u003cb\u003eCloud Storage\u003c/b\u003e\u003c/summary\u003e\n\n- [x] All storage classes and location types are supported\n\t- [x] region\n\t- [x] dual-region\n\t- [x] multi-region\n- [x] Retrieval fees are calulated\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e🚇 \u003cb\u003eHybrid Connectivity\u003c/b\u003e\u003c/summary\u003e\n\n- [x] VPN tunnel\n- [ ] Interconnect is currently not calculated\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e🔗 \u003cb\u003eCloud NAT\u003c/b\u003e\u003c/summary\u003e\n\n- [x] NAT gateway\n- [x] Data processing (both egress and ingress)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e🚦 \u003cb\u003eCloud Monitoring (Operations Suite)\u003c/b\u003e\u003c/summary\u003e\n\n- [x] Monitoring data\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e🕸️ \u003cb\u003eNetwork\u003c/b\u003e\u003c/summary\u003e\n\n- [x] Premium Tier internet egress\n\t- [x] Worldwide destinations (excluding China \u0026 Australia, but including Hong Kong)\n\t- [x] China destinations (excluding Hong Kong)\n\t- [x] Australia destinations\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e🏗️ \u003cb\u003eTODO\u003c/b\u003e\u003c/summary\u003e\n\nThe following services are not currently supported, but are on the TODO list:\n\n- [ ] BigQuery\n- [ ] Cloud SQL\n\nPlease suggest other resources worth covering by upvoting existing issue or opening new issue.\n\u003c/details\u003e\n\n\n## 🧑‍🏫 Start the interactive tutorial\n\nThis guide is available as an interactive Cloud Shell tutorial.\nTo get started, please click the following button:\n\n[![Open in Cloud Shell](https://gstatic.com/cloudssh/images/open-btn.png)](https://shell.cloud.google.com/cloudshell/open?cloudshell_git_repo=https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator\u0026cloudshell_git_branch=master\u0026cloudshell_tutorial=cloud-shell-tutorial.md)\n\n\n## 🏃 Quick start\n\n### 1. Get `gcosts` program\n\n[Download](https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/releases/latest) the ready complied and executable `gcosts` CLI program for your operating system and architecture.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eLinux\u003c/b\u003e\u003c/summary\u003e\n\nDownload:\n* [x86_64](https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/releases/latest/download/gcosts-linux-x86_64) Intel or AMD 64-Bit CPU\n  ```bash\n  curl -L \"https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/releases/latest/download/gcosts-linux-x86_64\" \\\n       -o \"gcosts\" \u0026\u0026 \\\n  chmod +x \"gcosts\"\n  ```\n* [arm64](https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/releases/latest/download/gcosts-linux-arm64) Arm-based 64-Bit CPU (i.e. in Raspberry Pi)\n  ```bash\n  curl -L \"https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/releases/latest/download/gcosts-linux-arm64\" \\\n       -o \"gcosts\" \u0026\u0026 \\\n  chmod +x \"gcosts\"\n  ```\n\nTo determine your OS version, run `getconf LONG_BIT` or `uname -m` at the command line.\n\nExecute `gcosts`:\n```bash\n./gcosts help\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003emacOS\u003c/b\u003e\u003c/summary\u003e\n\nDownload:\n* [x86_64](https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/releases/latest/download/gcosts-macos-x86_64) Intel 64-bit\n  ```bash\n  curl -L \"https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/releases/latest/download/gcosts-macos-x86_64\" \\\n       -o \"gcosts\" \u0026\u0026 \\\n  chmod +x \"gcosts\"\n  ```\n* [arm64](https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/releases/latest/download/gcosts-macos-arm64) Apple silicon 64-bit\n  ```bash\n  curl -L \"https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/releases/latest/download/gcosts-macos-arm64\" \\\n       -o \"gcosts\" \u0026\u0026 \\\n  chmod +x \"gcosts\"\n  ```\n\nTo determine your OS version, run `uname -m` at the command line.\n\nExecute `gcosts`:\n```bash\n./gcosts help\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eWindows\u003c/b\u003e\u003c/summary\u003e\n\nDownload:\n* [x86_64](https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/releases/latest/download/gcosts-windows-x86_64.exe) Intel or AMD 64-Bit CPU\n   ```powershell\n   Invoke-WebRequest -Uri \"https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/releases/latest/download/gcosts-windows-x86_64.exe\" -OutFile \"gcosts.exe\"\n   ```\n* [arm64](https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/releases/latest/download/gcosts-windows-arm64.exe) Arm-based 64-Bit CPU\n   ```powershell\n   Invoke-WebRequest -Uri \"https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/releases/latest/download/gcosts-windows-arm64.exe\" -OutFile \"gcosts.exe\"\n   ```\nTo determine your OS version, run `echo %PROCESSOR_ARCHITECTURE%` at the command line.\n\nExecute `gcosts.exe`:\n```powershell\n.\\gcosts.exe help\n```\n\u003c/details\u003e\n\n### 2. Download price information\n\n[Download](https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/raw/master/pricing.yml) the latest and tested price information file `pricing.yml`.\nThe price information is automatically regenerated on a weekly basis.\nDownload the updated pricing file regularly.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eLinux\u003c/b\u003e\u003c/summary\u003e\n\nDownload `pricing.yml`:\n```bash\ncurl -L \"https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/raw/master/pricing.yml\" \\\n     -o \"pricing.yml\"\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003emacOS\u003c/b\u003e\u003c/summary\u003e\n\nDownload `pricing.yml`:\n```bash\ncurl -L \"https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/raw/master/pricing.yml\" \\\n     -o \"pricing.yml\"\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eWindows\u003c/b\u003e\u003c/summary\u003e\n\nDownload `pricing.yml`:\n```powershell\nInvoke-WebRequest -Uri \"https://github.com/Cyclenerd/google-cloud-pricing-cost-calculator/raw/master/pricing.yml\" -OutFile \"pricing.yml\"\n```\n\u003c/details\u003e\n\n### 3. Run it\n\nPrepare a separate directory (i.e. `usage`) just for your YAML usage files and create your first YAML usage file (`resources.yml`) in this directory:\n```yml\nregion: europe-west4\nproject: my-first-project\ninstances:\n  - name: app-server\n    type: e2-standard-8\n    os: rhel\n    commitment: 3\n    disks:\n      - name: disk-boot\n        type: ssd\n        data: 75\n```\n\n\u003e **Warning**\n\u003e If the price list (`pricing.yml`) is in the same directory, errors occur because the YAML file is also parsed.\n\nExecute the CLI program:\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eLinux\u003c/b\u003e\u003c/summary\u003e\n\nExecute `gcosts`:\n```bash\n./gcosts calc --pricing YML-PRICING-PATH\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003emacOS\u003c/b\u003e\u003c/summary\u003e\n\nExecute `gcosts`:\n```bash\n./gcosts calc --pricing YML-PRICING-PATH\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eWindows\u003c/b\u003e\u003c/summary\u003e\n\nExecute `gcosts.exe`:\n```powershell\n.\\gcosts.exe calc --pricing YML-PRICING-PATH\n```\n\u003c/details\u003e\n\nWithout extra specification of the directory all YAML files (`*.yml`) of the current directory are imported and the costs of the resources are calculated.\nYou can specify the directory:\n```bash\ngcosts calc --dir DIRECTORY-PATH --pricing YML-PRICING-PATH\n```\n\nThe calculated costs are exported to one CSV (comma-separated values) file.\nWithout specifying the file location, the file is named `costs.csv` and is saved in the current directory.\nYou can specify the CSV export file:\n```bash\ngcosts calc --csv CSV-EXPORT-FILE-PATH --pricing YML-PRICING-PATH\n```\n\nYou can import the CSV file with MS Excel, Apple Numbers, LibreOffice or Google Sheets.\n\n### 4. Get familiar\n\nContinue to familiarize yourself with the options. The following documentations are prepared for this purpose:\n\n* [Create usage files](usage/README.md)\n* [Build pricing information file](build/README.md)\n\n**🤓 Tip**\n\nAdd `gcosts` to your Shell aliases with absolute pathnames.\nYou can then execute `gcosts` anywhere.\n\nAlias (`~/.aliases`):\n```bash\nalias gcosts='/your-pathname/gcosts --pricing /your-pathname/pricing.yml'\n```\n\n## ❤️ Contributing\n\nHave a patch that will benefit this project?\nAwesome! Follow these steps to have it accepted.\n\n1. Please read [how to contribute](CONTRIBUTING.md).\n1. Fork this Git repository and make your changes.\n1. Create a Pull Request.\n1. Incorporate review feedback to your changes.\n1. Accepted!\n\n\n## 📜 License\n\nAll files in this repository are under the [Apache License, Version 2.0](LICENSE) unless noted otherwise.\n\nPortions of this repository are modifications based on work created and shared by [Google](https://developers.google.com/readme/policies)\nand used according to terms described in the [Creative Commons 4.0 Attribution License](https://creativecommons.org/licenses/by/4.0/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyclenerd%2Fgoogle-cloud-pricing-cost-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyclenerd%2Fgoogle-cloud-pricing-cost-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyclenerd%2Fgoogle-cloud-pricing-cost-calculator/lists"}