It was during his freshman year of high school that Amit Kalra started falling behind in maths class. But it wasn't because he couldn't handle it.
Kalra, now 16, had been transferred to a new school where he was put into an algebra class he had already taken. And by the time he convinced his mum to put him back in the old school, he was halfway behind in geometry - a subject he wasn't familiar with.
"I started struggling," Kalra told Business Insider. "I was on my own. I didn't know anyone in the class."
Most kids would have given up and resigned themselves to summer school, or maybe even studied extra hard just to get by. Kalra decided to build an app that would do all his maths homework for him.
The coding of '6284 Calc'
In May 2015, Kalra started working on what would become his iOS app, 6284 Calc. Needless to say, it's not like any other calculator app you've ever seen.
That's because it's specifically made to take the guesswork out of algebra, geometry, calculus, and other subjects, by allowing users to input the values into the given formula, letting the app do the rest.
And for a one time in-app purchase of $1.99, it will even give you all the steps it took to get there.
"What if this app just does the work for them?" Kalra asked of students who may be struggling like he was, thinking they might just skip homework.
"They just have to spend five minutes a day entering values. It's better than turning in nothing."
Kalra didn't have much iOS coding knowledge before 6284 Calc, except for little test projects like a random lottery number generator app he built for his dad. He ended up teaching himself how to code by downloading an ebook and experimenting.
But just roughly four months after he began, Kalra released 6284 Calc - the numbers represent M-A-T-H on a telephone keypad - and he's been updating it ever since.
"Every time I learn something in class, the first thing I do instead of doing the homework, I would actually go work on it in the app first," he said.
Since the app's release, it's had about 30,000 downloads, though Kalra has done little marketing other than to text all his friends to try it out.
It also caught the attention of Apple, which invited him to attend the Worldwide Developer Conference earlier this year.
Going from gamer to coder
Kalra's story of app coding goes back a little bit further to when he was a typical teenager playing video games. One of his favourites was Roblox, a massive multiplayer online game that allows players to explore inside a virtual world.
And as most teens can relate, his parents weren't all that approving of his hobby. "What are you doing all day?" was a common refrain.
But he learned that he could also build his own worlds and games inside Roblox when he was 12, so he downloaded an ebook and decided to give it a shot.
"That's where my interest for coding came in," Kalra said, since Roblox encourages "you to make your own games."
It took him about six months. The result was Parkour City, a big open city-like space where users could jump around and do all kinds of flips and other moves.
Though it's taken a while to get noticed, this summer it hit the 1-million-visit mark, and it's been on Roblox's top charts.
I asked Kalra what he's planning to do after high school. He said that for now, 6284 Calc is his main focus, but he might try to work on something new.
And plans to go to college might not be in the cards: "I don't know if college would be beneficial to me," he said.
For a teenager who can download some books and just figure things out, that calculation may turn out to be just right.
This article was originally published by Business Insider.