What are the best coding classes in Stirling?
Stirling council area had about 92,600 usual residents at Scotland's 2022 census, rounded to the nearest hundred by National Records of Scotland, and 42.4 people per square kilometre. The MacTutor history of mathematics records that the mathematician James Stirling was born in 1692 at Garden, about 20 kilometres west of the town. Stirling learners aged six to sixty-seven have live video lessons with our teachers in India, one to one or in a small class of five to ten at one level, arranged around the Scottish school day and working hours. The first lesson costs nothing; after that it is USD 100 a month for a class place or USD 150 a month for one-to-one teaching.
A factorial multiplies every whole number up to n: 5! is 120, and 20! is already 2,432,902,008,176,640,000. The formula named after James Stirling, born near the town in 1692, estimates n! without multiplying at all. Our Stirling project asks how good that estimate is. Teenagers compute factorials exactly in Python, including 92,600!, one for every resident of Stirling council area in the 2022 census, a number with 419,696 digits, and compare each with Stirling's formula. At n = 10 the formula is 0.83% too low. At n = 92,600 it is out by less than one part in a million, and it predicts the digit count exactly.
Facts last verified 23 September 2026. Teaching is online; no Stirling branch is claimed.
Pick the course nearest to what the learner already enjoys. Each one begins with a free live lesson, and there is no card to give when you book.

Block programming for younger children, from games to counting how many ways a set of cards can be arranged.
See the syllabus
Multiplication, powers and logarithms explored in short programs, the arithmetic behind enormous numbers.
See the syllabus
Secondary mathematics in depth, including logarithms, series and approximations used far beyond the classroom.
See the syllabus
Python for adults who work with very large or very small numbers and need to know where a computer's arithmetic runs out.
See the syllabusBrowse the course atlas for more than one hundred options and use the coding roadmap to check prerequisites.
The four we are known for
These run underneath everything above. Every one is live and online, placed by ability rather than by age, and the first class is free.

Python, web and AI projects where the learner still owns the thinking.
See the syllabus
Automate the work you already do, then let AI carry part of it.
See the syllabus
Train a model, read what it learned, and be able to say why it is wrong.
See the syllabus
Run AI coding agents on real work without losing control of the codebase.
See the syllabusThe first results of Scotland's 2022 census, published by National Records of Scotland for each council area and rounded to the nearest hundred, for Stirling and for Scotland.
| Place | Counted in 2011 | Counted in 2022, to the nearest hundred | People for each square kilometre in 2022 |
|---|---|---|---|
| Stirling | 90,247 | 92,600 | 42.4 |
| Scotland | 5,295,403 | 5,436,600 | 69.8 |
The 2022 figures put about 6,500 Stirling residents at ages 15 to 19 and about 7,500 at ages 20 to 24, each rounded to the nearest hundred.
There were about 40,300 households with at least one usual resident in 2022, compared with 37,566 at the 2011 census.
In 2022, 14.6% of Stirling residents were 14 or under and 20.5% were 65 or over; for Scotland the shares were 15.3% and 20.1%.
Every 2022 figure is rounded on its own by National Records of Scotland, so we print each one as published and never add them together. Our Stirling classes take in the city and the villages around it. A Raploch eight-year-old building a first game, an S5 pupil from Torbrex working through Higher Mathematics and a Causewayhead adult learning Python to automate reports could each join a class at a different level.
From Historic Environment Scotland's listing records, and from the MacTutor History of Mathematics biography of James Stirling at the University of St Andrews.
Historic Environment Scotland's listing for the Church of the Holy Rude records that James VI was crowned in the church on this date. Its west tower and nave date from 1456 to about 1470.
Cowane's Hospital, the Guildhall on St John Street, was built to a design by John Mylne and is dated 1639, with a statue of John Cowane in a niche on its tower. Both buildings are listed at Category A.
MacTutor records that James Stirling, born at Garden in 1692, published Methodus Differentialis in 1730, and that the formula for n! now known as Stirling's formula appears there as Example 2 to Proposition 28.
MacTutor also records that Stirling wrote to the mathematician De Moivre about errors in a table of logarithms of factorials, and that De Moivre extended his own results using Stirling's ideas. Historic Environment Scotland lists the Old Town Jail, the Tolbooth, Argyll Lodging, the Athenaeum and Stirling railway station at Category A too. We have no connection with Historic Environment Scotland or the University of St Andrews, and the dates and descriptions here are theirs.
How the numbers were checked
Python can hold whole numbers of any size, so every factorial on this page up to 92,600! was computed exactly, digit by digit, and compared with Stirling's formula. The census figure of 92,600 is the rounded 2022 count for Stirling council area.
Stirling's formula says that n! is close to the square root of 2 pi n, multiplied by n divided by e, raised to the power n. It needs no multiplication of the numbers from 1 to n at all, only a power, a square root and a few constants.
| n | Exact n! | Formula too low by | Adding 1/(12n) leaves |
|---|---|---|---|
| 5 | 120 | 1.65% | 0.0022% |
| 10 | 3,628,800 | 0.83% | 0.000277% |
| 100 | a 158-digit number | 0.0833% | 0.000000278% |
| 1,000 | a 2,568-digit number | 0.00833% | too small to measure in ordinary floating point |
| 92,600 | a 419,696-digit number | 0.00009% | too small to measure in ordinary floating point |
Multiply 1 by 2 by 3 all the way to n with Python's unlimited whole numbers. 92,600! takes under a second and ends in 23,147 zeros, one for each factor of 5 hiding in the numbers.
The formula's answer for 92,600 is far too big for a normal decimal number, so compare logarithms instead: the logarithm tells you the number of digits and the leading digits.
The error falls roughly in proportion to one over 12n: 0.83% at 10, 0.0833% at 100, 0.00833% at 1,000. Adding that term as a correction makes the formula far more accurate again.
An ordinary floating-point number, the kind most calculators and spreadsheets use, can hold nothing larger than about 1.8 times 10 to the power 308. The largest factorial that fits is 170!. Anything bigger has to be handled through logarithms, and that is exactly what Stirling's formula provides: for 92,600! it gives a logarithm of 419,695.39, so the number has 419,696 digits and begins 2.45888, matching the exact calculation.
The corrected formula is so accurate that at n = 1,000 and above, the remaining gap is smaller than ordinary floating-point arithmetic can resolve. A learner who reports "zero error" there has found the limit of the computer, not a perfect formula. Knowing which of those two things you are looking at is the most useful lesson on this page.
Learned on factorials in Stirling, then used for probability, statistics, physics, finance models and any calculation too large to do exactly.
| Question | For Stirling's formula | What goes wrong if you skip it |
|---|---|---|
| Is there an exact answer to compare? | Python computes every factorial exactly | An approximation checked only against itself |
| How is the error measured? | As a percentage of the exact value | Huge absolute errors that are actually tiny |
| Does the error behave as theory says? | It shrinks like 1 over 12n | An unnoticed bug hiding in a plausible number |
| Where does the computer give out? | Floating point stops at 170! | Overflow reported as infinity or an error |
| Is a tiny error real or rounding? | Below double precision past n = 1,000 | Rounding noise mistaken for a result |
The second row is the surprise for most learners. At n = 92,600 the formula is off by an absolute amount that is itself a number with more than 419,000 digits, yet as a share of the answer the error is less than one part in a million. Whether an approximation is good depends entirely on how the error is measured.
Counting how many ways three, four and five cards can be arranged, and seeing how fast the numbers grow.
Factorials, logarithms, asymptotic formulas and floating-point limits in Python, checked against exact arithmetic.
Judging when an approximation is good enough for work, with the error measured the right way.
We have no connection with the University of St Andrews, Historic Environment Scotland, National Records of Scotland or Stirling Council. The biography, listing records and census tables are published openly; the factorials, errors and comparisons on this page are our own calculations.
The age bands are a guide; the free lesson shows the right place to start.
Arranging and counting objects in block code, and noticing how quickly the totals grow.
Scratch Coding for KidsMental Maths for KidsLoops, multiplication and very large whole numbers in Python, with a program that prints factorials.
Python and AI for KidsMaths Through CodingLogarithms, Stirling's formula and floating-point limits, with every estimate tested against an exact answer.
High School MathematicsPython for TeensHandling very large and very small values in Python without silent overflow or rounding errors.
Python MasterclassCollege Maths CourseBecause models are built on floating-point numbers, and knowing their limits explains many of the tricks inside them.
Machine learning systems multiply and add millions of numbers, and they routinely work with logarithms of probabilities rather than the probabilities themselves, for the same reason this project does: the raw values would overflow or vanish. A learner who has watched 171! break a calculator understands why.
The project also teaches honest error reporting. An approximation that is 0.00009% out sounds perfect until you notice the true answer has 419,696 digits. Saying clearly how an error was measured is a habit that matters whenever a machine hands you a number.
So a Stirling teenager should keep learning to code in 2026, a short ride from where James Stirling was born in 1692: computers do the multiplying, but people still need to know when the answer can be trusted. The longer argument is in why coding is worth learning in 2026.
Stirling learners live on both sides of the River Forth and out towards Bannockburn and Bridge of Allan. Online, each of them is the same distance from the lesson.
A learner in Cornton and another in Cambusbarron can take the same class without either of them making the trip into town.
Classes follow the stages Scottish families know, from the P years through S1 to S6, with National 5, Higher and Advanced Higher courses named as schools name them; teaching is in English.
The free session is spent coding, not listening to a pitch, and ends with the teacher suggesting a level, a course and a weekly time. No card details are taken.
Five to ten learners at a single level, from Stirling, elsewhere in the UK and overseas, which keeps sensible times open for every stage.
Two fixed lessons weekly, around eight a month, with holidays and exam study planned together with the teacher.
India keeps one clock all year, so a Stirling lesson at five in the afternoon starts at 21:30 for our teachers during British Summer Time and 22:30 once the clocks go back.
Across central Scotland
Learners in Dunblane, Callander, Falkirk or Alloa join exactly the same classes, because every lesson is online and classes are arranged by level.
The opening lesson is free, and a single monthly fee follows.
A whole lesson at no charge, finishing with a recommended level, course and weekly time.
About eight live lessons a month, in a class of five to ten learners at one level.
About eight live lessons a month, with a teacher giving your learner their full attention.
Families in Borestone or Causewayhead pay in US dollars, as every family outside India does, and our site never shows pound prices. Payment starts only after the free lesson, once you have settled a course and a weekly time with us; pauses, missed lessons and changes between group and private teaching are explained on the pricing page.
Rated 4.9 across 547 Google reviews. These are real reviews, reproduced as written.
★★★★★
"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."
Ria Mukherjee
Parent
★★★★★
"Modern Age Coders has been a game-changer for me. I struggled to grasp IT concepts and coding before joining, but their classes transformed everything. I can now confidently write complex programs with ease."
Samriddha Mondal
Student
★★★★★
"One of the most wonderful education centres out there. Education is not limited to school syllabus but focuses on skill development."
Vansh Agarwal
Student
★★★★★
"My child Dhairya is really enjoying the Modern Age Coders classes. This is his first online class and he eagerly looks forward to it. I can already see his improvement, and the teachers are very cooperative."
Sonam Oswal
Parent of Dhairya
★★★★★
"Modern Age Coders have wonderful teachers who teach in a clear, easy and practical way. The teacher boosts students' confidence and inspires them to learn without hesitation."
Sonu Goyal
Parent
★★★★★
"I highly recommend this computer coding class! The teachers are incredibly knowledgeable and passionate about coding."
Ritu Kedia
Parent
We match the first lesson to the learner: a card-arranging counting game for a young child, a short Python program that prints factorials for a beginner, or exact factorials and Stirling's formula for a teenager ready for real numerical mathematics.
What Stirling families most often ask us.
Scotland's Census 2022 counted about 92,600 usual residents in Stirling council area, rounded to the nearest hundred by National Records of Scotland, against 90,247 at the 2011 census.
The council area has 42.4 residents per square kilometre against 69.8 for Scotland, and in 2022 20.5% of its residents were 65 or over, close to the Scottish figure of 20.1%.
An approximation for n!, the product of all whole numbers up to n: the square root of 2 pi n times n over e to the power n. It becomes more accurate as n grows, and adding a small correction of 1/(12n) improves it further.
For n = 10 it is 0.83% below the exact 3,628,800; for n = 1,000 it is 0.00833% below; for n = 92,600 it is less than one part in a million below, and it gives the exact number of digits, 419,696.
The MacTutor History of Mathematics records that he was born in May 1692 at Garden, about 20 km west of Stirling, and published Methodus Differentialis in 1730, where the formula now named after him appears. We are not connected with MacTutor or the University of St Andrews.
Historic Environment Scotland's listing for the Church of the Holy Rude in Stirling records that James VI was crowned there on 29 July 1567. The church is listed at Category A.
Most Stirling families choose a time after school, on a weekday evening or at the weekend, agreed in the free lesson. For our teachers in India that is late evening: they are four and a half hours ahead of Scotland in summer and five and a half in winter.
No. We have no Stirling centre and no premises anywhere in the UK, because every lesson is live online. Learners need a computer with sound and a stable connection, and our phone number is Indian.
The first lesson is free. After that, a group place costs USD 100 a month for two live lessons a week, about eight a month, with five to ten learners, and one-to-one teaching on the same timetable costs USD 150 a month. Nothing is charged until the course, format and time are agreed.
By level, pace and goals rather than by age or address, with five to ten learners at the same stage. If no group fits the learner's week, we offer one-to-one lessons.
Up the road, the Perth page runs Soundex over Walter Scott's The Fair Maid of Perth, and to the south-west Glasgow has its own project. Scottish exam years are covered on the National 5 Computing Science and Higher Computing Science pages. Read the Scotland guide for how our stages match the Curriculum for Excellence, and the UK coding page for every other city.