Online vs In-Person Coding Classes for Kids: Which Fits Better? (2026)

Learn Math

Nadia Rahmawati
Math Curriculum Team, Algonova

The LCM is the smallest number both figures divide into exactly, while the HCF is the largest number that divides both exactly. Children aged 9 to 12 rarely struggle with the calculation itself; what confuses them is deciding whether a word problem wants the LCM or the HCF. Below is a one-question test that settles it, plus 12 worked examples with full answers.
Algonova is an online school for maths, coding, AI, and design for children aged 5-17, with more than 1,000,000 alumni across 97 countries since 2016. Maths classes run live with certified teachers in small groups of up to 10 students, and the first session is a free 45-minute diagnostic.
HCF breaks things into groups, LCM waits until they meet again.
That sentence sounds simple but resolves most of the confusion. HCF applies when something is shared evenly into groups, for instance splitting 24 apples and 36 oranges into identical baskets. LCM applies when two events repeat and you want to know when they coincide, for instance two lights flashing at different intervals.
Watch the direction of the numbers too. The HCF is always smaller than or equal to the smallest number in the problem. The LCM is always larger than or equal to the largest. If a child's answer breaks that rule, something is wrong, and the check takes two seconds.
Both rest on the same foundation, which is factorisation. If that is shaky, start with Prime Factorisation and Multiples and Factors.
One factor tree is enough to produce both answers at once: the HCF and the LCM.
The rule is two lines, and a child needs both memorised:
Break both numbers into prime factors:
HCF: the shared factors are 2 and 3. The lowest power of 2 is 2², and of 3 is 3¹. So the HCF = 4 x 3 = 12.
LCM: take every factor at its highest power, which is 2³ and 3². So the LCM = 8 x 9 = 72.
Start with the HCF, because the numbers are smaller and children spot the pattern faster.
| No | Problem | Factorisation | Answer |
|---|---|---|---|
| 1 | HCF of 12 and 18 | 12 = 2² x 3 · 18 = 2 x 3² | 6 |
| 2 | HCF of 16 and 24 | 16 = 2⁴ · 24 = 2³ x 3 | 8 |
| 3 | HCF of 20 and 30 | 20 = 2² x 5 · 30 = 2 x 3 x 5 | 10 |
| 4 | HCF of 15 and 25 |
The LCM uses the same factor tree, only the selection rule flips: every factor, highest power.
| No | Problem | Factorisation | Answer |
|---|---|---|---|
| 7 | LCM of 12 and 18 | 2² x 3 and 2 x 3² | 36 |
| 8 | LCM of 8 and 12 | 2³ and 2² x 3 | 24 |
| 9 | LCM of 9 and 12 | 3² and 2² x 3 | 36 |
| 10 | LCM of 10 and 15 | 2 x 5 and 3 x 5 |
Ask one question: is this problem splitting something, or waiting for things to meet again?
If something is shared evenly into groups, it is the HCF. Common signals: shared equally, as many as possible, the largest number of, identical.
If two events repeat and you want the meeting point, it is the LCM. Common signals: together, how often, meet again, at the same time.
One trap worth knowing: the phrase "as many as possible" does not automatically mean HCF. In the basket problem, "as many baskets as possible" is indeed HCF. But in "how soon will they next coincide", the answer is LCM despite the superlative. That is why the split-or-meet question is more reliable than memorising keywords.
Once a child is fluent here, the follow-on material is Mixed Operations, and staged division practice is in How to Teach Long Division. Year-by-year topics are at Year 5 Maths and Year 6 Maths. Effective study approaches are covered in 5 approaches to learning maths
Quick check: 12 divides both 24 and 36, and 12 is not larger than 24. Then 72 is divisible by both 24 and 36, and 72 is not smaller than 36. Both pass the direction rule.

For a child not yet comfortable with powers, simply write the factors out in a row without index notation. The result is identical, and the notation can follow next year.
| 5 |
| 5 | HCF of 14 and 21 | 14 = 2 x 7 · 21 = 3 x 7 | 7 |
| 6 | HCF of 18 and 27 | 18 = 2 x 3² · 27 = 3³ | 9 |
Problem 3 worked step by step. The shared factors of 20 and 30 are 2 and 5. The lowest power of 2 is 2¹ and of 5 is 5¹. The 3 is not taken because it appears only in 30. So the HCF = 2 x 5 = 10.
Each time, have your child check the direction: is the answer smaller than or equal to the smallest number in the problem? For number 3, 10 is smaller than 20, so it passes.
The classic HCF word problem: 24 apples and 36 oranges shared into as many identical baskets as possible. The answer is HCF(24, 36) = 12 baskets, each holding 2 apples and 3 oranges.
| 30 |
| 11 | LCM of 14 and 21 | 2 x 7 and 3 x 7 | 42 |
| 12 | LCM of 18 and 27 | 2 x 3² and 3³ | 54 |
Problem 9 worked step by step. The factors of 9 are 3², and of 12 are 2² x 3. Take every factor at its highest power: 2² from 12 and 3² from 9. So the LCM = 4 x 9 = 36. Check: 36 divides exactly by 9 and by 12, and 36 is larger than 12.

The classic LCM word problem: a red light flashes every 4 seconds and a blue light every 6 seconds. When do they flash together? The answer is LCM(4, 6) = every 12 seconds. A child can prove it by listing multiples: 4, 8, 12 and 6, 12. The number 12 is the first meeting point.
The HCF is the largest number that divides both figures exactly, while the LCM is the smallest number that both divide into exactly. The easiest way to remember it is one sentence: HCF breaks things into groups, LCM waits until they meet again. Take 12 and 18. The HCF is 6, because 6 is the largest number dividing both. The LCM is 36, because 36 is the smallest number divisible by both 12 and 18. A direction check helps too: the HCF is never larger than the smallest number in the problem, and the LCM is never smaller than the largest.
Break both numbers into prime factors, then apply two different rules to the same result. For the HCF, take the prime factors both numbers share, using the lowest power. For the LCM, take every prime factor that appears, using the highest power. Take 24 and 36. The factorisations are 24 = 2³ x 3 and 36 = 2² x 3². The HCF takes 2² x 3, which is 12. The LCM takes 2³ x 3², which is 72. One factor tree gives both answers, so a child never needs to do the work twice.
Ask the problem one question: is something being shared evenly, or are we waiting for two events to coincide? If it shares evenly into groups, the answer is the HCF. For example splitting 24 apples and 36 oranges into identical baskets gives 12 baskets. If two events repeat and you want the meeting point, the answer is the LCM. For example lights flashing every 4 and 6 seconds flash together every 12 seconds. This question is more reliable than memorising keywords, because a phrase like "as many as possible" can appear in both types.
Generally in Years 4 to 6, around ages 9 to 12, once a child knows factors and multiples. The real prerequisite is prime factorisation rather than age. A child who cannot yet break 24 into 2 x 2 x 2 x 3 stalls at the first step, not at the concept of LCM or HCF. If a Year 5 child is still confused, step back for two weeks to factors and multiples, then return. It usually flows much better. The topic returns in secondary school when simplifying fractions, so the foundation needs to be solid.
Because both use the same factor tree, so children assume the procedure is identical and simply guess at the end. The only difference is the selection rule: HCF takes shared factors at the lowest power, LCM takes every factor at the highest power. If those rules are not memorised separately, children blend them. The fastest fix is writing both rules on a small card and taping it to the study desk for two weeks. After that, practise with mixed problems rather than a block of HCF followed by a block of LCM, so the child must choose each time.
Yes, and it takes two seconds. Check the direction of the number before checking the arithmetic. The HCF must be smaller than or equal to the smallest number in the problem. If a child answers that the HCF of 12 and 18 is 24, it is wrong without any recalculation. The LCM must be larger than or equal to the largest number. If a child answers that the LCM of 12 and 18 is 6, that is wrong too. Once the direction check passes, verify the division: the HCF must divide both exactly, and the LCM must be divisible by both.
Yes, by listing factors or multiples, and that approach is actually better for a first introduction. For the HCF of 12 and 18, list the factors of 12 as 1, 2, 3, 4, 6, 12 and of 18 as 1, 2, 3, 6, 9, 18. The largest number in both lists is 6. For the LCM of 4 and 6, list multiples of 4 as 4, 8, 12 and of 6 as 6, 12. The first meeting point is 12. Listing becomes tiring with larger numbers, so the factor tree still needs teaching once the child understands the meaning.
The HCF is used when sharing something evenly with nothing left over, and the LCM when working out when two repeating cycles coincide. An HCF example at home: splitting 24 cakes and 36 sweets into as many identical party bags as possible gives 12 bags. An LCM example: two class schedules repeating every 4 days and every 6 days fall on the same day every 12 days. Later on, the HCF simplifies fractions and the LCM finds common denominators, so both stay in use through secondary school.
About two to three weeks at 15 minutes a day is enough for most children in Years 4 to 6. What matters is variety rather than volume. A child who does ten HCF problems in a row will calculate fluently but still freeze on a mixed set. A pattern that works: four problems a day, two HCF and two LCM shuffled, so the child must read the problem and choose a method. Add one word problem every other day, because that is where the real difficulty lives.
The problem is reading comprehension rather than maths, and the two need different practice. Children who fail word problems usually grab the numbers and calculate without first deciding what is being asked. The arithmetic is correct but it answers the wrong question. A drill that helps: have the child cover the numbers and retell the problem in their own words before calculating. If they can describe the situation, choosing LCM or HCF becomes easy. If the same error repeats, a diagnostic session with a teacher usually finds the cause faster than adding more problems.
Coworking Area, Gedung IT 6 Lantai Dasar, Nongsa Digital Park, Jalan Hang Lekiu, Kelurahan Sambau, Kecamatan Nongsa, Batam, Indonesia Directorate General of Consumer Protection and Trade Compliance – Ministry of Trade of the Republic of Indonesia. WhatsApp Ditjen PKTN: 0853-1111-1010.
PT Algonova Indonesia Cerdas All rights reserved 2026