Math Word Problem Topic Router

Paste a math word problem and a text model in your browser routes it to a topic like rates, percentages or geometry.

It does not solve it.

Free, private.

Last updatedHow we build & check our tools

Interactive Tool

This tool runs in your browser and is loading now.

Enter your values once it appears to see your results.

How Math Word Problem Topic Router works

Press Load model once: your browser downloads Universal Sentence Encoder (MediaPipe) (13 MB) from this site and keeps it in its cache. Then add your text and press Classify locally. The model runs on this device, so nothing you enter is sent to a server. Until the model is loaded, or if your device cannot run it, the tool falls back to a simple keyword check and labels the result as the fallback.

Universal Sentence Encoder (MediaPipe) turns text into a list of numbers that captures its meaning, so two sentences about the same thing end up close together even when they share no words. Each label below comes with a handful of example phrases. The tool compares your text with every example and picks the label whose closest example is nearest in meaning.

Scores are the cosine similarity between your text and that closest example, rescaled to 0-100: this model rarely scores two English sentences below 0.6 even when they are unrelated, so 0.6 maps to 0 and an exact match to 100. When the top two labels are within 3 points the result says it is a close call, because the model is effectively unsure.

Labels and example phrases

  • Rates, speed and work - Set up distance = rate × time, or combined work rates. Examples: "a train travels 240 miles in 4 hours, what is its average speed", "two painters working together finish a room in how many hours", "a pipe fills a pool at 50 liters per minute".
  • Percentages and money - Percent change, discounts, tax, tips or interest. Examples: "a jacket costs $80 and is on sale for 25% off", "what is a 15% tip on a $42 restaurant bill", "the town population grew from 2,000 to 2,300, find the percent increase".
  • Geometry and measurement - Area, perimeter, volume, angles or the Pythagorean theorem. Examples: "find the area of a rectangular garden 12 m by 8 m", "a circle has a radius of 5 cm, find its circumference", "how much fencing is needed to go around a square yard".
  • Probability and counting - Chance of an outcome, or the number of arrangements and combinations. Examples: "a bag has 3 red and 5 blue marbles, what is the probability of drawing red", "when rolling two dice, what is the chance the sum is 7", "in how many ways can 4 students line up for a photo".
  • Ratios and proportions - Set up equal ratios or scale factors. Examples: "the ratio of boys to girls in a class is 3 to 4", "a recipe uses 2 cups of flour for every 3 cups of milk", "on a map 1 inch represents 50 miles".
  • Algebra: unknown numbers and ages - Name the unknown, write an equation, solve it. Examples: "Tom is three times as old as his son, in 10 years he will be twice as old", "the sum of two consecutive integers is 51, find the integers", "twice a number plus 7 equals 25, what is the number".

Worked example

The model's output for the built-in sample, recorded on a desktop browser. Your run may word things slightly differently.

Problem: A tank fills at 3 gallons per minute and drains at 1.2 gallons per minute. How long until it contains 90 gallons?
Best match
Rates, speed and work
Runner-up
Ratios and proportions
How clear-cut
Clear
All labels
Rates, speed and work 36 · Ratios and proportions 25 · Percentages and money 22 · Geometry and measurement 18 · Algebra: unknown numbers and ages 18 · Probability and counting 9

The model

The files are served from this site, versioned so a cached copy is never stale. Nothing is fetched from a third party while you use the tool.

You can switch models in the tool. Also available: Gemma 4 E2B instruction-tuned (web build) (2.0 GB). The larger language model gives more thorough answers but is a bigger download and needs a stronger device.

ModelDownloadRuns onLicence
Universal Sentence Encoder (MediaPipe)6.1 MBProcessor (WebAssembly)Apache-2.0
Gemma 4 E2B instruction-tuned (web build)2.0 GBGraphics card (WebGPU)Apache-2.0

Limitations

  • Similarity in meaning is not the same as a rule. A text about a topic can land on the label whose examples share that topic even when a person would pick another label, so read close calls yourself.
  • The labels are fixed. If your text belongs to none of them, the tool still picks the nearest one; a low top score is the hint.
  • Results describe the input you gave, not the real-world situation behind it. Review them yourself before acting.

Good uses

  • Triage education and study notes before deeper review
  • Prepare consistent labels for repeat workflows
  • Reduce manual sorting on small batches
  • Keep sensitive drafts in the browser preview

Frequently Asked Questions

Common questions about the Math Word Problem Topic Router

No. The model files download from this site once, and then everything runs in your browser tab. The text you enter is never sent to a server, and closing the tab discards it.