Subscription plans
The SonarCloud’s pricing model is subscription-based: each organization is assigned a subscription plan. Three different plans are available for new organizations:
- Free plan, if you want to analyze public projects only.
- Team plan, for smaller teams.
- Enterprise plan, for larger organizations and teams.
The paid plan is deprecated.
For information about the billing model, see Managing your organization's subscription payment.
Free plan
If you want to analyze only public projects in your organization, you can use the free, open-source plan. This plan allows you to import and analyze an unlimited number of public projects in your organization. When using the free plan, your code and analysis results will be publicly accessible.
Any private repository in that organization will not be importable.
Anyone, including anonymous users, can view a free plan organization record. Non-members cannot see the organization’s list of members.
Team plan
Upgrading an organization to the Team plan allows you to import private repositories from your DevOps platform. A private repository becomes a private project in SonarCloud, guaranteeing the privacy of your source code. Only members of the organization can view the organization in the SonarCloud interface.
The paid plan's pricing is based on the number of Lines of Code (LOC) of private projects: see LOC-based pricing below.
A Team plan organization may include both public and private projects. It can contain an unlimited number of public projects with no size limit, just like in a free plan organization (i.e. there is no LOC threshold for public projects).
If you downgrade an organization from the Team plan to the free plan, the private projects will be deleted.
Enterprise plan
With the Enterprise plan, you benefit from the following features in addition to the Team plan's features (see above):
- Enterprise-level hierarchy.
- SSO authentication through SAML.
- Management reporting: portfolios, security reports, and project reports.
- Organization-wide project configurations: long-lived branches name pattern definition, analysis scope adjustment, automatic analysis disabling.
- Report of security alerts in GitHub.
- Support of the ABAP, COBOL, RPG, PL/I, Apex languages.
- Centralized management of the organization's projects (Projects Management tab).
The Enterprise plan's pricing is based on the number of Lines of Code (LOC) of private projects: see LOC-based pricing below.
What happens with the existing paid plan organizations?
If your paid plan organization is billed on a monthly basis, it will still benefit, for a given period, from some features that were moved to the Enterprise plan:
- Report of security alerts in GitHub.
- Support of the ABAP, COBOL, RPG, PL/I, Apex languages.
- Centralized project management.
If your paid plan organization was billed using a yearly coupon, you will have the option to try out the Enterprise features for a limited time, support excluded, starting in August 2024.
LOC-based pricing
With the Team and Enterprise plans, you choose the maximum total number of lines of code (LOC) allowed in the organization’s private projects.
You need to ensure that your choice of plan covers all of the LOCs you want to analyze; otherwise, you may not be able to onboard all of your projects.
You cannot exceed your LOC threshold in SonarCloud. Once you are near your LOC limit, you will receive a notification informing you of this and advising you to upgrade your current subscription plan to a higher LOC limit or to reduce the number of LOC in your projects.
You can analyze the same code as often as you like. However, if you try to analyze more LOC than is allowed under your current subscription, SonarCloud will not perform the analysis, and you will also receive an error message clearly explaining the reason for this.
LOC calculation
Lines of code are calculated by adding up the LOCs of each project analyzed. The LOCs that are counted are those found on the largest branch of the project. If you have set up branch analysis, the LOCs will be counted from the latest analysis of the project with the largest branch or PR. This means that if your main branch, for whatever reason, does not contain any LOC, then the largest branch (or pull request) will be counted instead.
For example:
- If a project has 500 lines of code on its main branch and 400 on a secondary branch, then the number of LOCs counted for the project is 500.
- If a project has 0 lines of code on its main branch (provisioned but never analyzed) and 200 on a secondary branch, then the number of LOCs counted is 200.
Typically, the simple formula for calculating the total number of lines of code (LOC) for the projects in your organization is by adding:
(P1 LOC) + (P2 LOC) + (P3 LOC) + (P4 LOC) = Total LOC
There are a number of exceptions that are not counted when calculating consumption on your LOC limit:
- Test code
- Files excluded from analysis
- Code in unsupported languages
- Comments or blank lines
- Code from public projects within your organization
For full details on pricing plans, see our product website.
Related pages
- Viewing your organization's billing and usage information
This page explains how to view the billing and LOC usage and explains the LOC calculation. - Managing your organization's subscription plan
This page explains how to sign up for a subscription plan, downgrade a plan, terminate a subscription, and check your subscription usage. - Managing your organization's subscription payment
This page explains the billing model and how to update your payment method, update your billing information, get invoices, and view indirect taxes. - Getting started with Enterprise
This section helps you onboard your organizations on the Enterprise plan.
Was this page helpful?