← Back to plugins Activity

Scientific Calculator

This plugin adds a modern, responsive Scientific Calculator activity to Moodle, with functions such as trigonometry, logarithms, powers, square roots, and factorials, performing all calculations in the browser using a safe parser (no eval) and a Bootstrap-based interface integrated with Moodle.

Frankenstyle mod_scicalc
Category Activity
Reported sites 25 sites
Screenshot of Scientific Calculator

About Scientific Calculator

Scientific Calculator

This is a Moodle activity module that adds a clean, fast, scientific calculator directly inside your course - perfect for math, physics, engineering, finance, and STEM training where students need a reliable tool without leaving the LMS.

Scientific calculator interface preview (illustrative)

What the plugin solves (in practice)

In many courses, students constantly switch tabs to external calculators. This activity keeps them focused, consistent, and productive - with a calculator always available inside Moodle, without relying on third-party sites or extensions.

Calculator inside the course
Students can compute expressions during lessons, quizzes, and homework - without leaving Moodle.
Scientific functions included
Trig, logs, powers, roots, factorial, constants and more - accessible with one click.
Safe evaluation (no eval)
Expressions are parsed and evaluated using a controlled algorithm - safer than typical eval-based calculators.
Simple history & reuse
A local calculation history lets students click results to reuse them instantly.
Best part
It works as a regular activity: add it once to the course and students can use it immediately - no extra accounts, no external sites.

How it works

The activity renders a Mustache template and loads a lightweight AMD module that handles input, parsing, and calculation entirely in the browser (client-side). That means fast interaction and no server load for each key press.

Rule of thumb
  • Type an expression → press Enter or =.
  • Functions insert as sin(, sqrt(, pow( to speed up usage.
  • History items are clickable → reuse results instantly.
Safe expression evaluation
Instead of using eval(), the calculator processes the expression with:
  • Tokenization (numbers, identifiers, operators)
  • Shunting-yard algorithm (infix → RPN)
  • RPN evaluation with a strict operator/function set
Designed for teaching workflows
Ideal for STEM courses that need quick calculations during learning and practice.
  • Add to any topic/week or section.
  • Works great alongside PDFs, lessons, and problem sets.
  • No personal data storage (privacy-friendly default).

Supported functions & constants

Expressions support common scientific operators, constants, and functions. Use ^ for power and ! for factorial. Constants are case-insensitive.

Operators
  • + - * / % ^
  • Parentheses: ( )
  • Factorial: !
Constants
  • pi (π)
  • e (Euler’s number)
Trigonometry
  • sin(x) cos(x) tan(x)
  • asin(x) acos(x) atan(x)
Algebra & logs
  • sqrt(x) abs(x) exp(x)
  • ln(x) log(x)
  • pow(a,b) min(a,b) max(a,b)
  • floor(x) ceil(x) round(x)
Tip
Use parentheses to keep expressions readable (e.g., sin(pi/2)+sqrt(9)*2).

Support

For issues and improvements, open a GitHub issue including: Moodle version, steps to reproduce, expression examples, and browser console logs (if relevant).

Best practices
  • Keep the calculator name clear (e.g., "Calculator (Math Support)").
  • Place it near problem sets and formula resources.
  • Encourage students to write expressions with parentheses.
  • Use examples in the activity description for faster onboarding.
Why this approach works
  • No core modifications.
  • No external dependencies.
  • Fast and responsive client-side UX.
  • Privacy-friendly by default (no student data stored).
  • Easy to extend (RAD/DEG, memory keys, saved history, exercises).
Related

Other Moodle plugins

Screenshot of Mod Super Video
Mod Super Video mod_supervideo

The Super Video Module and Kapture enhance the teaching experience on Moodle by providing optimized video viewing and efficient video lecture production, enriching the learning environment for both teachers and students.

1794 sites Details →
Screenshot of Beautiful certificate
Beautiful certificate mod_certificatebeautiful

The Certificate Beautiful plugin for Moodle allows you to create customized certificates with elegant and professional designs. It features an intuitive and user-friendly interface.

816 sites Details →
Screenshot of PDF Protect
PDF Protect mod_pdfprotect

This is a Moodle module developed to provide an extra layer of security for PDF files, preventing users from downloading, printing, or copying the content of the PDF. It is ideal for protecting sensitive material and preventing unauthorized sharing of documents.

657 sites Details →