Posts

Showing posts from August, 2026

Your calculator should work with JavaScript switched off

Open almost any Indian finance calculator with JavaScript disabled and you get an empty box. Sometimes a spinner that never resolves. The page has loaded; the thing you came for has not. That is a strange way for a tool to fail when its entire job is one arithmetic operation. Who this actually breaks Not developers who switch JavaScript off for sport. The people who hit this are: Anyone on a slow or intermittent connection, where the HTML arrives and the script bundle times out Office, college and institutional browsers with locked-down policies Low-end Android devices, where a heavy bundle is slow enough to feel broken Every crawler, preview bot and link unfurler that does not execute JavaScript The last one has a consequence people underrate. A page whose content only exists after JavaScript runs is a page that search engines see empty on first pass. Rendering happens later, on a lower-priority queue, if it happens promptly at all. You have not just inconvenienced a reader ...

We wrote 159 automated tests for arithmetic. Here is why.

"It is just arithmetic" is the most expensive sentence in this codebase. Every calculator on EMICalcs is covered by automated tests that run on every build. There are 159 of them, and if any figure drifts from its expected value the build fails and nothing ships. People occasionally ask why compound interest needs a test suite. This post is the answer, and it is a single number. The cliff Take a salaried person under the new regime for FY 2026-27. Gross pay ₹12,75,000. After the ₹75,000 standard deduction, taxable income is exactly ₹12,00,000. Their tax is ₹0. The section 87A rebate wipes it out entirely. Now give them a ₹100 raise. Gross ₹12,75,100, taxable ₹12,00,100 — one hundred rupees over the rebate ceiling. Their tax is ₹104. Not ₹62,416, which is what the slabs alone produce on ₹12,00,100 once you add 4% cess. ₹104. The difference is marginal relief : when crossing the rebate threshold woul...

Three Indian EMI calculators, three different answers

Last year I was comparing two home loan offers and did what anyone does — opened a few EMI calculators and typed the same numbers into each. ₹50,00,000, 8.5%, 20 years. I got three different answers. Not wildly different. The spread was a few hundred rupees a month. But across 240 instalments a few hundred rupees is a few lakh, and worse, I had no way to tell which one was right. None of them showed their working. Where the divergence comes from The formula itself is not controversial: EMI = P × r × (1+r)^n ÷ ((1+r)^n − 1) P is the principal and n the number of months. The disagreement is always r , the monthly rate. Given a quoted 8.5% a year, is it: 0.085 ÷ 12 = 0.00708333… — simple division, which is what Indian lenders actually use, or (1.085)^(1/12) − 1 = 0.00681… — the true compounded equivalent? Both are defensible arithmetic. Only the first matches your sanction letter, because Indian lender...