StianØyna

Software developer, Norway

Projects / 2026

Math quiz

A mental maths quiz you answer out loud, alone or racing friends on your phones.

Open projectView source

A quiz for practising sums out loud. It shows a question, you tap the microphone and say the answer, and the browser’s own speech recognition turns it into text. The quiz reads the number in it (digits or words, “seven” or “it’s seven”, in English or Norwegian), marks it, and moves on. Once the voice has worked, it listens by itself for the next question, so a round can be played hands-free.

There are fourteen levels: plus and minus up to 10, 20 and 100, the times tables to 10 and to 20, division, all four mixed, negative numbers, two on Danish numbers, where you read a word like “tooghalvfjerds” and give the number (72), and four “smart fives”: times 5, divide by 5, times 15, 25 and 50, and numbers ending in 5 times themselves (35 × 35 = 1225), and a group on reference numbers: guided lessons in multiplying numbers near 100 (or 10, 50, 200), 105 · 112 as (105 + 12) · 100 + 5 · 12, step by step in colour, with the help fading as you get it (every step with hints, then fewer steps, then just the answer), and free practice after. Other levels are answered by choosing rather than by a number: bigger, smaller or equal (3 ? 4, 8 + 5 ? 12, and fractions, 1/4 ? 1/5, with pie charts to help at first), and whether a number is a prime. A group of first steps in discrete maths asks how big a union or intersection of two small sets is, whether a statement like (3 < 5) ∧ (4 > 6) is true, factorials and C(5, 2), remainders (17 mod 5) and the next number in a sequence. Every kind of level has optional tips with quick techniques: × 5 is × 10 and halve, × 25 is ÷ 4 and × 100, and for 35 × 35 you take 3 × 4 = 12 and put 25 after it.

A wrong answer doesn’t move on: you just try again, with nothing to erase, until it’s right. After three tries you can have the answer shown (for a Danish number, with the twenties behind it, since Danish counts 50 to 90 in scores: “halvfjerds” is 3½ × 20), but you still give it yourself to go on. The results show how many tries each question took, eight right first time suggests moving up, and the best score at each level is remembered. Each level also has an online top 10 (one nick per browser, shared with the site’s other games). Once a level is picked, the quiz fills the screen: a bar with the microphone, keypad, sound and timer, and otherwise just the numbers.

You can also race friends, each on your own phone. One of you starts a race and shares the link or the room code, the host picks a level, and after a 3-2-1 everyone gets the same ten questions. Right first time scores 100 points, and every right answer adds up to 100 more for speed; a wrong try costs you the 100 and the time it takes to try again, so rushing doesn’t pay. A small server (a Cloudflare Durable Object) keeps the clock and the score, and the standings move as you play.

Speech recognition works in Chrome, Edge and Safari. Chrome and Edge send the audio to Google’s or Microsoft’s speech service to do it; the page itself stores nothing. Where there is no recognition (Firefox), or in a noisy room, a number pad does the same job.