Logic Calculator

Client: Infobits ApS

Mathematics
Web Development
Logic Calculator

Logic Calculator: Making Logic Accessible

Project Overview

Logic Calculator is an educational web application for propositional logic and Boolean algebra. It parses and evaluates logical expressions, generates complete truth tables, visualizes expression structure as an interactive tree, and determines satisfiability, validity, and equivalence — turning abstract formalism into something students and educators can explore with immediate feedback.

The Challenge

Propositional logic underpins mathematics, computer science, and philosophy, but the leap from paper exercises to real intuition is hard. We set out to build a tool that would:

  • Parse complex expressions using the standard operators NOT, AND, OR, IF, and IFF
  • Produce truth tables and structural analyses instantly
  • Explain why a formula is a tautology, contradiction, or contingency — not just classify it
  • Run fully offline on any device, in the student's own language
  • Be fast and accessible enough to use live during a lecture

Our Solution

Logic Calculator bundles an expression engine and a set of analytical tools in a single focused interface:

  • Expression Evaluation: Parse and evaluate complex formulas using !, &, |, ->, and <->
  • Truth Table Generator: Automatic, complete truth tables for any formula
  • Expression Tree: Interactive visual representation of how the expression is parsed
  • Satisfiability & Validity: Classify formulas as tautologies, contradictions, or contingencies
  • Equivalence Testing: Compare two expressions for semantic equivalence
  • 19 Languages: Full UI localization including English, Spanish, French, German, Italian, Portuguese, Chinese, Japanese, Korean, Hindi, Bengali, Vietnamese, Arabic, Russian, Turkish, Dutch, Swedish, Norwegian, and Danish

Technical Implementation

The application is engineered for speed, privacy, and reach:

  • Next.js 15 Static Export: Pre-rendered pages deployed to Cloudflare's edge network for instant loads anywhere in the world
  • Client-Side Evaluation: Parsing, truth tables, and tree rendering happen entirely in the browser — no data leaves the user's device
  • Type-Safe Foundation: TypeScript across the parser, evaluator, and UI for predictable behavior
  • Comprehensive Testing: Jest for unit tests, Playwright for end-to-end coverage, and Lighthouse CI gating every release at 90+ performance
  • Accessibility: WCAG-compliant with full keyboard navigation, screen-reader labels, and high-contrast support
  • Responsive by Default: Optimized for desktop, tablet, and mobile — equally usable in a lecture hall or on a phone

Results

Logic Calculator has become a dependable classroom companion:

  • Available in 19 languages, reaching the majority of the world's students
  • Used in university-level logic and discrete mathematics courses
  • Consistent Lighthouse scores above 90 across performance, accessibility, and SEO
  • Privacy-friendly by design — nothing leaves the browser

Future Directions

The tool continues to grow:

  • Predicate (first-order) logic with quantifiers
  • Interactive natural-deduction proof construction
  • Natural-language explanations of transformations
  • LMS integrations for assignments and submissions

Logic Calculator shows how a focused, well-engineered web app can turn an abstract subject into something students can explore, visualize, and truly understand.

Ready to accelerate your project?

Our team of expert consultants is ready to help you build, optimize, and deploy high-performance applications that scale with your business.