I'm Chris Yau, and I built Calculator.now, a free site with a large collection of online calculators. Most of the site is personal finance, health and school maths, but there's a corner of it I use every week as a developer: the tech calculators.

None of these do anything you couldn't do with a shell one-liner. When I'm on a deploy call, reviewing a Terraform plan or answering "why is this file 403-ing?", I just want the answer and the working on one screen, so I can paste it into a ticket. Here are six I use most, with a worked example for each and a snippet you can use to check the result yourself.

1. chmod: octal ⇄ symbolic ⇄ binary

Every permission digit is just three bits: read = 4, write = 2, execute = 1. Add them up per class (owner, group, others) and you've got the octal mode.

Worked example: a config file the app user can edit, its group can read, and nobody else can touch.

Class r w x Sum
Owner 4 2 0 6
Group 4 0 0 4
Others 0 0 0 0

So it's 640, or rw-r-----, or u=rw,g=r,o= in symbolic form.

chmod 640 config/app.env stat -c '%a %A' config/app.env # 640 -rw-r----- 

The chmod calculator lets you work from checkboxes, symbolic notation (u=rwx,g=rx,o=r) or a 3- or 4-digit octal number. It gives you the chmod command ready to copy, plus the binary form (110 100 000) and an rwx visual. It also handles SUID, SGID and the sticky bit, and has one-click presets for 755, 644, 700, 600 and the rest. The binary view helps when you're explaining to a junior dev why 777 is a bad idea.

2. CIDR blocks and subnets

Every time I have to size a VPC subnet I end up re-deriving the same formula:

total addresses = 2^(32 − prefix) usable hosts = 2^(32 − prefix) − 2 (except /31 and /32) network = IP AND mask broadcast = network OR wildcard 

Worked example: 10.20.0.0/22

  • Subnet mask: 255.255.252.0 (wildcard 0.0.3.255)
  • Total addresses: 2^10 = 1,024
  • Usable hosts: 1,022 (10.20.0.1 to 10.20.3.254)
  • Broadcast: 10.20.3.255

You can sanity-check that in Python's standard library:

import ipaddress net = ipaddress.ip_network("10.20.0.0/22") print(net.netmask, net.hostmask, net.broadcast_address) # 255.255.252.0 0.0.3.255 10.20.3.255 print(net.num_addresses, net.num_addresses - 2) # 1024 1022 

(Cloud providers usually reserve a few more addresses in each subnet, so check your provider's docs before you plan right up to the limit.)

If you'd rather not open a REPL, the CIDR subnet calculator takes an IP plus either a prefix or a dotted mask. It returns the network and broadcast addresses, the usable range, the wildcard mask and the address class, and tells you whether the address is private. You can also tick boxes to show every octet in binary or hex, which is the clearest way I know to see why /22 cuts the third octet in half. There's also a separate IP Subnet Calculator on the site with a handy /24 to /32 cheat-sheet table.

3. Unix timestamps

Logs, JWT exp claims and API payloads all speak in epoch seconds. Humans don't.

Worked example: what is 1714822400?

date -u -d @1714822400 # Sat May 4 11:33:20 UTC 2024 
new Date(1714822400 * 1000).toISOString(); // '2024-05-04T11:33:20.000Z' 

Two things trip people up again and again:

  1. Seconds vs milliseconds. JavaScript's Date.now() returns milliseconds, while most backends store seconds. If your date lands in the year 56,000-something, you forgot to divide by 1,000.
  2. Y2038. The largest signed 32-bit value, 2147483647, is 2038-01-19 03:14:07 UTC. Anything still storing time in a 32-bit int overflows one second later.

The Unix timestamp converter converts both ways (always in UTC) and shows a live current-epoch clock. It also does timestamp arithmetic: add or subtract seconds, minutes, hours, days, weeks, months or years from a base timestamp. That's the bit I use most, for questions like "if this token was issued at X with a 7-day TTL, when does it expire?"

4. Hex, binary and octal (plus bitwise ops)

Colour codes, memory addresses, flag fields and byte dumps all need quick base conversions.

Worked example: the CSS colour #1E90FF

r, g, b = (int("1E90FF"[i:i+2], 16) for i in (0, 2, 4)) print(r, g, b) # 30 144 255 

And going the other way: 0xFF = 255 = 0b11111111, and octal 755 = 0b111101101. That's the same number chmod uses in section 1.

The hex calculator converts between decimal, hex, binary and octal. It can also run shift-left, shift-right, NOT, AND, OR and XOR against a second value. You can choose the bit width (8, 16, 32 or 64 bits), group digits in fours or eights, add 0x/0b/0o prefixes, and show the conversion steps. If you're debugging bit masks specifically, the site also has a dedicated Bitwise Calculator with a bit-by-bit operation table and unsigned right shift (>>>).

5. "How long will this download take?"

This one is mostly about bits vs bytes. Network speeds are quoted in bits per second, while file sizes are in bytes, so you multiply by 8 before you divide.

time (s) = (file size in bytes × 8) / (link speed in bits/s × efficiency) 

Worked example: pulling a 50 GB dataset over a 300 Mbps line at 90% efficiency:

size_bits = 50e9 * 8 rate = 300e6 * 0.9 print(size_bits / rate / 60) # ≈ 24.7 minutes 

The download time calculator takes KB/MB/GB/TB and Kbps/Mbps/Gbps, lets you set an efficiency (overhead) percentage, and can show the result in seconds, minutes, hours and days at once. I find it useful for setting expectations before a big backup restore or a container registry migration.

6. GB vs GiB: storage units

Your "500 GB" disk shows up as about 465 GiB in the OS, and nothing went missing. Drive makers use decimal units (1 GB = 1,000,000,000 bytes), while many tools report binary units (1 GiB = 1,073,741,824 bytes).

print(500e9 / 2**30) # 465.66 GiB 

The storage unit converter on Calculator.now converts between bits, bytes and every unit up to petabytes, and can show binary units (KiB, MiB…) alongside. It also has two extras I didn't expect to use as much as I do. One estimates file sizes by type (text, images, audio, video or database records). The other works out how many files of a given size fit on a drive, and what percentage of it they'd use.

Why bother with a web calculator?

Honestly, for a lot of this a REPL is faster if you already remember the formula. I reach for the calculators when:

  • I'm explaining something to someone else and want them to see the working, not just my answer;
  • I want a second opinion on a value I'm about to put into a firewall rule or a chmod -R;
  • I'm on a machine (or a phone) where I don't have my usual shell set up.

Everything runs in the browser with no sign-up. If something's wrong, or there's a dev calculator you wish existed, tell me in the comments. I read them, and requests help me decide what to build next.

Disclosure: I'm the founder of Calculator.now, so I'm biased. All the snippets above are plain standard-library code, so you can check every number without using my site at all.