When I built my time card calculator, the first decision I made had nothing to do with overtime rules or rounding. It was this: no timesheet ever leaves the visitor's device. There is no server doing the maths, no account to sign into, and no database of anyone's working hours sitting on my hosting. The whole thing runs in plain JavaScript in the browser.

I made that choice for a practical reason first and a privacy reason second. The practical reason is cost and reliability. A calculator that only needs static files can live on cheap shared hosting, loads fast, and keeps working even if the back end has a bad day — because there is no back end. The privacy reason is simpler: a timesheet is personal. It says when you start work, when you finish, how long your lunch was, and how much you earn. Nobody should have to hand that to a stranger's server just to check their pay.

So how does it actually work? The page is a set of input fields — clock-in, clock-out, break length — for each day of the week. When you type a time, a small script parses it, converts it to minutes since midnight, and works out the day's total. Add the days together, apply the overtime rule, multiply by the hourly rate, and you have gross pay. Every step happens in the browser's own memory. If you open the network tab in dev tools while using it, you will see the page load its files and then go quiet. Nothing is posted anywhere.

That sounds simple, and the happy path is. The tricky part is everything around it. Times have to be parsed the way people actually type them: 9, 9:30, 9:30a, 5p, 17:30. Night shifts cross midnight, so a clock-out of 6am after a 10pm clock-in has to roll to the next day instead of producing a negative number. Breaks have to be subtracted after the gross hours are worked out, not before, or the totals drift. None of that needs a server — but all of it needs care, because the browser is the only place the maths can go wrong, and there is no server log to catch it.

Saving a timesheet raised the same question. People come back to the same calculator every week, and retyping seven days of shifts is annoying. The answer was localStorage, the browser's own little key-value store. Your entries are saved in your own browser, on your own device, and read back when you return. I never see them. And because the data belongs to the visitor, the Clear all button wipes both the fields on screen and the saved copy in localStorage — a fresh visit starts genuinely empty.

There are trade-offs, and I would rather name them than hide them. Running everything client-side means the calculator cannot email you a copy of your timesheet, because there is nothing on my side to send it from. The receipt download works around that: the page renders your time card to a canvas and saves it as an image, still without anything leaving the device. It also means I cannot fix your data if something goes wrong — there is no copy to recover. And the calculations are only as good as the rules I coded in; a browser calculator cannot phone payroll and ask.

But for a tool like this, the trade is worth it. The site loads fast, costs almost nothing to run, and asks for nothing in return — no email, no sign-up, no tracking of your hours. That is the whole point of building it this way. If you want to see it in action, the time card calculator on mytimecardcal.com is the live version, and everything I have described above is exactly how it behaves.

Building client-side first changed how I think about every calculator since. Before reaching for a server, I now ask: does this data ever need to leave the person's device? Most of the time, the honest answer is no — and the product is better for it.