Developer Calculator

Examples

Click an example to load it into the matching calculator.

Expression

Operators + - * / % ** ^, shifts/bitwise << >> >>> & |, parentheses, and hex/binary/octal literals (0xFF, 0b1010, 0o17). Shifts are arithmetic: 1 << 31 = 2³¹.

Result

495

Developer Calculator

A calculator built for developers: expressions with hex/binary literals, bitwise math, two's complement, IEEE-754 floats, byte and JSON sizes, IPv4 CIDR, timestamps, and performance, bandwidth, storage and cache estimators — all locally.

About this tool

What is it?
DataFormatter Developer Calculator is a free online calculator built for developers: evaluate expressions with hex, binary and bitwise operators, model integer widths from 8 to 64 bits with two's-complement behavior, convert between radices with masking, measure byte sizes, compute CRC-32 and estimate latency or API traffic.
Who is it for?
Developers who work in hex, bytes and bitwise math and want one calculator for bit-level expressions, integer overflow modeling, size checks and load estimation.
What makes DataFormatter's tool different?
It pairs a bitwise expression engine with an interactive integer-width and two's-complement visualization as well as data-size, latency and API-traffic estimators — everything computes locally in your browser.

Quick start

  1. Start on the Expression tab with a literal like 0xFF * 4.
  2. Hit Radix to see a number in all four bases, or Two's complement for signed widths.
  3. Use Bytes on API payloads to predict request size before sending.
  4. Estimate concurrency, bandwidth or cache memory as you plan a service.
  5. Grab a CRC-32 when you need a quick content fingerprint.

What the developer calculator does

  • Arithmetic with + - * / % **, parens, 0x/0b/0o literals, functions (sqrt, log, min, max…), constants and scientific notation.
  • Bitwise operator parser (& | ^ ~ << >> >>>) with width masking, integer-type ranges (Int8…UInt64), two's complement and overflow flags.
  • IEEE-754 float32/float64 bit layout: sign, exponent, mantissa, subnormals, infinity and NaN.
  • Data size in decimal vs binary units, JSON size (pretty vs minified), encoding sizes (UTF-8/16, hex, Base64, URL).
  • Timestamps & durations, IPv4 CIDR ranges, statistics and percentiles, string analysis.
  • Percent math and CRC-32 hashing returning the unsigned 32-bit integer and its hex form.

How to use it in your workflow

  • Size an API body with Bytes, then trim it to fit your limit.
  • Check an 8-bit signed cast with Two's complement or a 192.168.1.0/24 subnet with CIDR.
  • Validate a bump to 120ms average latency: concurrency = RPS × latency.
  • Confirm two config blobs are byte-identical with CRC-32.
Expression with hex literal
0xFF + 1
Evaluated result
256

Number systems: hex, binary and decimal in one expression

The calculator reads 0x (hexadecimal), 0b (binary) and 0o (octal) literals, so one expression can mix formats: 0xFF + 1 evaluates to 256. The Radix tool shows the same value across all four bases and its signed interpretations — 255, 0xFF and 0b11111111 are one number written three ways.

  • Hexadecimal (base 16) — the compact form used for byte values, color codes and memory addresses; each pair of hex digits is one byte.
  • Binary (base 2) — bit patterns for masks, flags and hardware register work, where reading a single set bit matters more than its magnitude.
  • Decimal (base 10) — the familiar result you paste into configs and tickets.
  • Negative and sized values — the Integer types and Two's complement tabs show how a value looks at Int8/16/32/64 and where it wraps.

Byte and encoding sizes: from UTF-8 to Base64

Before you ship a payload, size matters. The Bytes and Encoding size tools answer the recurring question of how big data really is: text in UTF-8 is one byte per ASCII character and 2–4 bytes for most other scripts, Base64 adds roughly a third ( SGVsbG8= is the 8-character encoding of the 5-byte string Hello), and JSON size compares your pretty-printed body against the minified form you would actually send.

  • Encoding size — UTF-8/16, hex, Base64 and URL-encoded byte counts for the same string side by side.
  • JSON size — pretty vs minified bytes, so you can quote the real saving to a reviewer.
  • CRC-32 — a fast, deterministic digest (shown as both the unsigned integer and hex) to confirm two payloads are byte-identical.

Who reaches for a dev calculator — and when

Estimating payload sizes

A JSON body that lives in Bytes mode for 30 seconds tells you whether it'll fit in a 1KB webhook or needs chunking before you ship it.

Byte-level debugging

Masked radix output reveals what an 8-bit signed cast does to a value that 'looks fine' in decimal; the float tool shows why 0.1 + 0.2 isn't 0.3.

Capacity planning

Put realistic RPS and latency into Performance, or a key count and value size into Cache, to sanity-check your sizing before you scale.

Sanity-checking hashes

Compare CRC-32 of two config blobs to confirm whether a deploy artifact actually changed.

When numbers surprise you

Radix mode refuses a negative number

Why: Radix conversion is defined for non-negative integers only.

Fix: Mask with a signed width to see the width-truncated representation, or use the Two's complement tool for the full signed view.

Expression says 'Result is not finite'

Why: Division by zero, or a huge exponent overflow.

Fix: Check for /0 and % 0 operands; use ** within a sane range.

CRC-32 differs from another tool

Why: Some tools output zlib (adler) or use a different polynomial, or print the signed 32-bit interpretation.

Fix: Compare against this tool's unsigned value; note that standard CRC-32 does not seed with the standard init in a few legacy tools.

Pro tips

  • Radix accepts a 0x/0b/0o prefix directly, so paste-what-you-copy works from docs.
  • Percentage mode guards against B=0 with a clear message instead of NaN.
  • Estimator tools show the exact formula under the results, so the numbers are auditable.
  • Calculation history is stored only in your browser — clear it from the History tab.
  • CRC-32 runs locally — use it on files you'd never upload to a public hash site.

Frequently asked questions

What's different from a normal calculator?

It's built for code: hex/binary/octal literals, bitwise operators and two's complement, IEEE-754 float layout, bit-width masking, byte and encoding sizes, IPv4 CIDR math, JSON size, plus performance, bandwidth, storage, cache and queue estimators. No eval() is ever used — everything runs through small operator-precedence parsers.

Can I use 0xFF and 0b1010 in expressions?

Yes. The expression tab accepts decimal, hex (0x), binary (0b) and octal (0o) integer literals alongside + - * / % ** and parentheses, following standard precedence.

What does signed width mean in Radix mode?

Masking a value to 8/16/32 bits shows what C-style casts and bitwise operations actually produce at that width — useful for byte arithmetics, checksums and register work. The Two's complement tool shows the full signed representation for any width.

What does Bytes mode measure?

UTF-8 byte length of your text plus its hex dump and Base64 encoding — so you can predict payload sizes before you send them. The Data-size tool converts between KB/MB/GB (decimal) and KiB/MiB/GiB (binary) exactly.

How do the estimator tools work?

Concurrency uses Little's law (RPS × latency), bandwidth is RPS × request+response size, and the storage/cache/queue tools apply your replication, growth, retention and overhead inputs with the math shown in the UI. They're planning estimates, not guarantees.

Is CRC-32 deterministic?

Yes — it's the standard IEEE 802.3 CRC-32 (polynomial 0xEDB88320), and it always returns the same unsigned 32-bit value for the same text, which makes it handy for quick equality checks.

Is anything uploaded?

No. Every calculation runs locally in your browser, including the CRC-32 hash and your calculation history — safe even for code fragments and secret samples.

Related tools

Last reviewed September 2026 · DataFormatter team — this tool processes data locally in your browser.