Computer Science Maths Calculators

Fifty calculators with worked examples for a typical three-year Computer Science degree. Browse foundations, algorithms and theory, and advanced or applied maths.

Choose a calculator to run its worked example, change inputs and check the result against your own method. Year labels describe a study progression. Module order varies by university.

Year 1 · Foundations

Number base converter

Convert a signed integer between binary, decimal, hexadecimal or any base from 2 to 36.

Two’s complement calculator

Encode a signed integer or decode a two’s complement bit pattern at a fixed width.

IEEE 754 float converter

Inspect the sign, exponent and fraction of a single-precision float.

Truth table generator

Build a Boolean truth table and identify a tautology, contradiction or contingency.

Set operations calculator

Find unions, intersections, differences and subset relations from two lists.

Two-set Venn calculator

Calculate the four regions of a two-set Venn diagram from totals and an overlap.

Permutations and combinations calculator

Count ordered arrangements and unordered selections without replacement.

Binomial probability calculator

Find the exact-count and tail probabilities for repeated independent trials.

Bayes’ theorem calculator

Find how a positive observation changes the probability of a hypothesis.

GCD and LCM calculator

Compute the greatest common divisor and least common multiple with Euclid’s remainder steps.

Modular exponentiation calculator

Compute the residue of an integer power with repeated squaring.

Matrix multiplication calculator

Multiply rectangular matrices and see how a row and column give the first entry.

Vector dot product calculator

Find the dot product, vector lengths, cosine similarity and angle.

Descriptive statistics calculator

Find mean, median, range endpoints, variance and standard deviation.

Polynomial derivative calculator

Differentiate a polynomial and evaluate the gradient at a chosen input.

Polynomial integration calculator

Integrate a polynomial over a real interval and see the antiderivative coefficients.

Arithmetic and geometric sequence calculator

Generate terms and a partial sum from a common difference or ratio.

Year 2 · Algorithms and theory

Chinese remainder theorem calculator

Solve simultaneous integer congruences and combine their moduli.

Gaussian elimination calculator

Solve a linear system by row reduction and identify free variables or inconsistency.

Matrix determinant calculator

Calculate the exact determinant and rank of a square matrix.

Matrix inverse calculator

Invert a square matrix with exact fractions and row operations.

Least squares regression calculator

Fit a line to paired values and inspect residuals and R².

Breadth-first search calculator

Run BFS and get the minimum hop count from a starting vertex.

Topological sort calculator

Order dependencies in a directed acyclic graph or detect a cycle.

Dijkstra shortest path calculator

Find shortest paths and route costs from one start using non-negative weights.

Minimum spanning tree calculator

Use Kruskal’s algorithm to connect an undirected graph at minimum total weight.

Floyd–Warshall calculator

Compute a full distance matrix and detect negative cycles.

Connected components calculator

Find the groups of vertices connected by paths in an undirected graph.

0/1 knapsack calculator

Choose items of maximum total value without reusing any item.

Levenshtein edit distance calculator

Count the smallest number of insertions, deletions and substitutions between two strings.

Longest common subsequence calculator

Find the length and one witness for the longest in-order match between two strings.

Master theorem calculator

Classify a divide-and-conquer recurrence and find its Θ bound.

Linear recurrence calculator

Generate exact terms of an integer recurrence from seed values and coefficients.

DFA simulator

Trace a word through a deterministic finite automaton and check acceptance.

NFA to DFA converter

Build reachable deterministic subsets from a nondeterministic finite automaton.

Year 3 · Advanced and applied maths

Markov chain calculator

Advance an initial distribution through a finite Markov chain.

Stationary distribution calculator

Solve πP = π and check the normalised probabilities against the transition matrix.

PageRank calculator

Rank vertices by a damped random walk with uniform teleportation.

Shannon entropy calculator

Calculate uncertainty in bits for a discrete probability distribution.

KL divergence calculator

Measure how much extra information is needed when Q models data from P.

Huffman coding calculator

Build a prefix code and estimate the average number of bits per symbol.

Confusion matrix calculator

Calculate accuracy, precision, recall, specificity and F1 for binary classification.

ROC AUC calculator

Compute the ROC points and area from test scores and binary labels.

Bernoulli naive Bayes calculator

Calculate binary class posteriors from feature presence and absence.

Softmax and cross-entropy calculator

Turn logits into probabilities and measure the loss for a target class.

Gradient descent calculator

Trace steps downhill on a quadratic loss and compare them with its analytic minimum.

2 × 2 eigenvalue calculator

Find real, repeated or complex eigenvalues from the characteristic polynomial.

Newton–Raphson calculator

Approximate a polynomial root and inspect each Newton update and residual.

Discrete Fourier transform calculator

Compute the complex frequency bins and magnitudes of a real sample sequence.

Discrete convolution calculator

Convolve two finite sequences using linear or circular boundary conditions.

Curriculum sources