When I started building calculators.im, I thought it would be a simple project — create a few calculator pages, deploy, done. Two years and 270+ calculators later, I've learned more about web performance, SEO, and product scaling than I ever expected. Here's everything I wish someone had told me before I started.
The Project: What Is calculators.im?
calculators.im is a collection of 270+ free online calculators covering everything from finance (mortgage, compound interest, ROI) to health (BMI, calorie needs, pregnancy due date) to math (scientific, percentage, fractions) and beyond.
The tech stack: Go for the backend, HTMX for interactivity, Tailwind CSS for styling, Redis for caching, and NGINX + Cloudflare for serving.
Lesson 1: SEO Is 80% of Your Traffic — Treat It as a Feature
I originally thought "build good calculators and they'll come." Wrong.
The reality: calculator sites are brutally competitive. There are dozens of sites competing for every keyword like "mortgage calculator" or "BMI calculator." Here's what actually works:
Target long-tail keywords over short ones. Instead of competing for "loan calculator" (dominated by Bankrate, NerdWallet), target "car loan calculator with extra payments" or "loan calculator with balloon payment." Lower competition, still significant volume.
Schema markup is non-negotiable. Adding WebApplication and FAQPage schema to each calculator dramatically increased click-through rates. Google often shows rich results in SERPs for tool pages with proper schema.
Page speed = ranking factor for tools. Users expect calculators to respond instantly. Every 100ms of latency costs you. With Go + HTMX, our Time to First Byte (TTFB) is under 50ms globally thanks to Cloudflare caching.
Lesson 2: HTMX Was the Right Bet — But Has Trade-offs
Choosing HTMX over React was controversial when I started. Here's the honest verdict after building 270 pages:
Wins:
- Zero client-side hydration = better Core Web Vitals (LCP, CLS)
- SEO-friendly by default — all content is server-rendered
- Bundle size: ~14kb for htmx vs 130kb+ for a React app
- Simpler mental model: HTML attributes over JavaScript state management
Trade-offs:
- Complex interactions (real-time charts, drag-and-drop) require either Hyperscript or vanilla JS alongside HTMX
- The community is smaller than React's, so fewer StackOverflow answers
- Some HTMX patterns feel verbose for highly dynamic UIs
Would I choose HTMX again? Yes — especially for content-heavy tool sites where SEO matters. For a complex SaaS dashboard, I'd reconsider.
Lesson 3: Go Is Overkill for Small Projects — Perfect for Scale
Go was genuinely the right choice, but not for the reasons I expected:
Memory footprint: Our entire server runs on a $6/month VPS and handles thousands of daily visits with ~30MB RAM usage. A Node.js equivalent would use 5-10x more memory.
Compilation catches bugs early. Go's strict type system eliminated an entire category of runtime errors that plague dynamic-language projects.
Single binary deployment. go build, rsync to server, restart. No npm install, no dependency conflicts, no environment issues.
The unexpected lesson: Go forces you to be explicit about error handling. At first this feels tedious (if err != nil everywhere), but it makes your code dramatically more reliable in production.
Lesson 4: Calculator UX Is Harder Than It Looks
Building a "simple" calculator that delights users involves surprisingly subtle decisions:
Input formatting: Users expect numbers to auto-format (1000 → 1,000) as they type. Implementing this with HTMX + Go required careful input sanitization to avoid formatting conflicts.
Instant results: Never make users click a "Calculate" button. Use HTMX's hx-trigger="input" to recalculate on every keystroke. Users expect calculator-app behavior from web calculators.
Mobile-first number inputs: On mobile, use inputmode="decimal" rather than type="number". The decimal keyboard is much better than the native number input's spinner interface for financial inputs.
Error states matter: When a user enters invalid input (letters in a number field, negative age, etc.), show clear, friendly error messages in context — not a page-level alert.
Lesson 5: The Content Around the Calculator Matters More Than the Calculator
This was my biggest revelation: the page content surrounding the calculator is more important for SEO than the calculator itself.
Every calculator page on calculators.im includes:
- A 500-800 word explanation of the formula and methodology
- A worked example with real numbers
- An FAQ section targeting "People Also Ask" queries
- A table of common values for reference
This content strategy is what earns backlinks, ranks for informational queries, and keeps users on the page longer — all positive signals.
Lesson 6: Redis Caching Saved Us at Scale
When a Reddit post linked to our percentage calculator, we got ~8,000 visits in 2 hours. Without Redis caching:
- Every request would hit Go and render the page fresh
- At 8,000 req/hr, that's manageable but wasteful
With Redis:
- Static page HTML is cached for 1 hour
- Dynamic calculation results are cached by input parameters
- Cache hit rate during the spike: 94%
- P99 response time during the spike: 18ms
The caching strategy: cache at two layers — page-level (full HTML response via Cloudflare) and calculation-level (Redis for computed results with the same inputs).
Lesson 7: Build the Infrastructure Once, Deploy 270 Times
The most important architectural decision was treating calculators as data, not code.
Each calculator is defined by a YAML config file:
- Input fields with types, labels, validation rules
- Formula as a Go expression
- Output formatting
- SEO metadata
The Go backend reads these configs and generates both the HTML and the calculation logic dynamically. Adding a new calculator takes about 15 minutes — write the YAML, write the formula, deploy.
This approach let us go from 10 calculators to 270+ without a linear increase in development time.
What I'd Do Differently
- Start with the content strategy, not the calculator. Write the explanatory content first, then build the tool around it.
- Add structured data from day 1. Retrofitting schema markup to 270 pages was painful.
- Build analytics from the start. Understanding which calculators get used heavily vs. which ones are ignored shapes your roadmap.
The Stack in Summary
- Backend: Go — fast, cheap to run, rock-solid
- Frontend interactivity: HTMX — SEO-friendly, tiny footprint
- Styling: Tailwind CSS — consistent, maintainable
- Caching: Redis — essential at any meaningful scale
- Infrastructure: NGINX + Cloudflare — global performance, free DDoS protection
If you're building a similar tool site, I hope this saves you some of the trial and error. Check out calculators.im to see what 270 calculators looks like in practice.
What questions do you have? Drop them in the comments — happy to go deeper on any of these lessons.
Top comments (0)