PHPackages                             gpacalcteam/cgpa-calculator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gpacalcteam/cgpa-calculator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

gpacalcteam/cgpa-calculator
===========================

A lightweight PHP library for calculating GPA, CGPA, and SGPA. Supports 4.0 and 5.0 grading scales.

v1.0.0(2mo ago)02MITPHPPHP &gt;=7.4

Since Apr 9Pushed 2mo agoCompare

[ Source](https://github.com/gpacalcteam/cgpa-calculator-php)[ Packagist](https://packagist.org/packages/gpacalcteam/cgpa-calculator)[ Docs](https://gpacalc.app)[ RSS](/packages/gpacalcteam-cgpa-calculator/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (2)Used By (0)

CGPA Calculator (PHP)
=====================

[](#cgpa-calculator-php)

A lightweight PHP library for calculating GPA, CGPA, and SGPA. Supports 4.0 and 5.0 grading scales.

**Try the online tool: [gpacalc.app](https://gpacalc.app)**

Installation
------------

[](#installation)

```
composer require gpacalcteam/cgpa-calculator
```

Usage
-----

[](#usage)

```
use GpaCalc\GpaCalculator;

// Calculate semester GPA
$courses = [
    ['grade' => 'A', 'credits' => 3],
    ['grade' => 'B+', 'credits' => 4],
    ['grade' => 'A-', 'credits' => 3],
];
$gpa = GpaCalculator::calculateGpa($courses); // 3.59

// Calculate cumulative GPA
$semesters = [
    ['gpa' => 3.5, 'credits' => 15],
    ['gpa' => 3.8, 'credits' => 16],
];
$cgpa = GpaCalculator::calculateCgpa($semesters); // 3.66

// Convert percentage to GPA
$gpa = GpaCalculator::percentageToGpa(88); // 3.3

// Convert GPA to letter grade
$letter = GpaCalculator::gpaToLetter(3.5); // "A-"
```

License
-------

[](#license)

MIT

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance85

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

79d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c07d8bdca58918763c91d3a73125059f40d3b93e19db74d45876522a2381b4c7?d=identicon)[gpacalcteam](/maintainers/gpacalcteam)

---

Tags

educationcalculatoracademicgpacgpasgpagrade-point-average

### Embed Badge

![Health badge](/badges/gpacalcteam-cgpa-calculator/health.svg)

```
[![Health](https://phpackages.com/badges/gpacalcteam-cgpa-calculator/health.svg)](https://phpackages.com/packages/gpacalcteam-cgpa-calculator)
```

###  Alternatives

[markrogoyski/ipv4-subnet-calculator

Network calculator for subnet mask and other classless (CIDR) network information.

175839.3k13](/packages/markrogoyski-ipv4-subnet-calculator)[ballen/distical

A distance (Lat/Long) calculation library for PHP

40194.3k2](/packages/ballen-distical)[copyleaks/php-plagiarism-checker

Copyleaks detects online plagiarism and checks content distribution. Use Copyleaks to find out if textual content is original and where it has been used before. This package shows how to integrate with the Copyleaks cloud to search for copyright infringement.

5069.7k](/packages/copyleaks-php-plagiarism-checker)[rinvex/universities

Rinvex Universities is a simple and lightweight package for retrieving university details with flexibility. A whole bunch of data including name, country, state, email, website, telephone, address, and much more attributes for the 17k+ known universities worldwide at your fingertips.

6616.4k](/packages/rinvex-universities)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
