> For the complete documentation index, see [llms.txt](https://docs.sonarsource.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sonarsource.com/sonarqube-cloud/administering-sonarcloud/managing-subscription/viewing-billing-and-usage.md).

# Viewing billing or usage information

This page provides instructions on how to view billing and usage information for both SonarQube Cloud organizations and enterprises.

This page explains how to view your billing and usage information. If you are concerned that you might be close to the LOC (number of lines of code) limit defined in your subscription plan, you can check your current consumption as described below. For more information, see [Subscription plans](/sonarqube-cloud/administering-sonarcloud/managing-subscription/subscription-plans.md#loc-based-pricing). To change the LOC limit, see [Changing your subscription plan](/sonarqube-cloud/administering-sonarcloud/managing-subscription/changing-plan.md).

{% hint style="info" %}
The LOC is a metric (`ncloc`) that you can also retrieve through the [Web API](/sonarqube-cloud/appendices/web-api.md) by using the `/api/measures` endpoint. See [Understanding measures and metrics](/sonarqube-cloud/managing-your-projects/metric-definitions.md) for more information.
{% endhint %}

## Viewing your organization’s billing and usage information <a href="#organization-information" id="organization-information"></a>

To view your organization’s billing and usage information, you must be an admin of the organization. Proceed as follows:

1. Retrieve your organization. See [Retrieving your organizations](/sonarqube-cloud/getting-started/viewing-organizations.md) for more details.
2. Go to **Billing and usage.**\
   The dashboard shows details of the total LOC analyzed to date and the total number of projects.\
   If your organization belongs to an enterprise:
   * If your organization uses the shared LOCs, you will see the usage of the shared LOCs. For more information about shared LOCs, see [Managing the lines of code within your enterprise](/sonarqube-cloud/administering-sonarcloud/managing-enterprise/managing-the-lines-of-code-within-your-enterprise.md#about-enterprise-loc-limit).
   * You will see the subscription status of the enterprise products.
3. Select the project count in the usage summary to view a per-project breakdown of lines of code.

<div align="left"><figure><img src="https://2223713658-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FB4UT2GNiZKjtxFtcFAL7%2Fuploads%2Fgit-blob-f6433edad78a9e9691775aa8a102b19d0122af1a%2Fsonarqube-cloud-show-loc-usage.png?alt=media" alt="SonarQube Cloud shows you the lines of code distribution per project." width="375"><figcaption></figcaption></figure></div>

## Viewing your enterprise’s billing and usage information <a href="#enterprise-information" id="enterprise-information"></a>

To view your enterprise’s billing and usage information, you must be an admin of the enterprise. Proceed as follows:

1. Retrieve your enterprise. See [Retrieving and viewing your enterprise](/sonarqube-cloud/administering-sonarcloud/managing-enterprise/retrieving-and-viewing-your-enterprise.md) for more details.
2. Go to **Billing and usage.**

The dashboard shows:

<figure><img src="broken://spaces/KXW79zfYFiA8incTvwZK/files/SDfq1S9tcP3eLbHma8CX" alt="The Billing and Usage tab of your enterprise shows (1) your current plan&#x27;s characteristics and (2) your usage information."><figcaption></figcaption></figure>

1. The characteristics of your enterprise plan with the subscription as well as the status of an additional products that require a separate subscription to your Enterprise license.
2. Usage information:
   * An overview of the lines of code consumption. For more details, see [Managing the lines of code within your enterprise](/sonarqube-cloud/administering-sonarcloud/managing-enterprise/managing-the-lines-of-code-within-your-enterprise.md#loc-consumption).

## Related pages <a href="#related-pages" id="related-pages"></a>

* [Subscription plans](/sonarqube-cloud/administering-sonarcloud/managing-subscription/subscription-plans.md)
* [Billing model](/sonarqube-cloud/administering-sonarcloud/managing-subscription/billing-model.md)
* [Signing up for a plan or product](/sonarqube-cloud/administering-sonarcloud/managing-subscription/signing-up-for-plan.md)
* [Changing your subscription plan](/sonarqube-cloud/administering-sonarcloud/managing-subscription/changing-plan.md)
* [Updating billing or payment details](/sonarqube-cloud/administering-sonarcloud/managing-subscription/updating-billing-payment-details.md)
* [Viewing taxes and invoices](/sonarqube-cloud/administering-sonarcloud/managing-subscription/viewing-taxes-and-invoices.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sonarsource.com/sonarqube-cloud/administering-sonarcloud/managing-subscription/viewing-billing-and-usage.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
