cgpa_calculator 1.0.1 copy "cgpa_calculator: ^1.0.1" to clipboard
cgpa_calculator: ^1.0.1 copied to clipboard

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

CGPA Calculator #

A lightweight Dart library for calculating GPA, CGPA, and SGPA. Supports 4.0 and 5.0 grading scales used by universities worldwide.

Try the online tool: gpacalc.app

Features #

  • Calculate semester GPA from course grades and credits
  • Calculate cumulative GPA (CGPA) across multiple semesters
  • Convert percentage scores to GPA on a 4.0 scale
  • Convert GPA values to letter grades
  • Supports both 4.0 and 5.0 grading scales

Usage #

import 'package:cgpa_calculator/cgpa_calculator.dart';

// Calculate semester GPA
final gpa = GpaCalculator.calculateGpa([
  {'grade': 'A', 'credits': 3},
  {'grade': 'B+', 'credits': 4},
  {'grade': 'A-', 'credits': 3},
]);
print(gpa); // 3.59

// Calculate cumulative GPA
final cgpa = GpaCalculator.calculateCgpa([
  {'gpa': 3.5, 'credits': 15.0},
  {'gpa': 3.8, 'credits': 16.0},
]);
print(cgpa); // 3.66

// Convert percentage to GPA
print(GpaCalculator.percentageToGpa(88)); // 3.3

// Convert GPA to letter
print(GpaCalculator.gpaToLetter(3.5)); // A-

GPA Calculator -- Free online GPA, CGPA, and SGPA calculator for students worldwide.

Also available for:

Learn more:

License #

MIT

0
likes
155
points
--
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

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

Homepage
Repository (GitHub)

License

MIT (license)

More

Packages that depend on cgpa_calculator