CSS Typed Arithmetic Playground
Test if your browser can divide CSS units — calc(100vw / 1px) and friends — then play with live typed expressions.
Not tested yet
This test asks your browser to actually compute typed calc() expressions — no guessing from version numbers.
Feature probes
| Capability | Expression | Result |
|---|
Live: your viewport as a number
The bar below is faded by pure CSS — opacity: clamp(0.08, calc((100vw / 1px - 320) / 1120), 1) — no JavaScript touches it. Resize this window and watch it respond. If your browser lacks typed arithmetic the declaration is dropped and the bar stays fully solid.
Viewport width: – · unitless ratio (0 at 320px, 1 at 1440px): –
Playground
Write any calc() expression, apply it to a real CSS property on the preview box, and read back the resolved value your browser computes.
Resolved value: –
What is CSS typed arithmetic?
CSS values carry types: lengths (px, vw, rem), angles (deg, turn), times (s, ms), percentages and plain numbers. Classic calc() was strict about them — you could divide a length by a number, but never by another length, because the result (a squared or cancelled unit) had no meaning in the old model. Typed arithmetic upgrades calc() with real type algebra: when you divide two values of the same type, the units cancel and the result is a unitless number.
That one change unlocks a pattern developers used to need JavaScript for. calc(100vw / 1px) reads the viewport width as a plain number. Normalize it between two breakpoints and you get a 0-to-1 progress value, computed entirely in CSS, that can drive opacity, rotation, scale, hue — any property that accepts a number or can be multiplied from one. Scroll-free parallax, viewport-reactive interfaces and fluid design systems all get simpler.
Browser support
Typed arithmetic shipped in Chrome and Edge 140, Safari 26, and Firefox 158 (October 2026), which puts it within reach of roughly 84% of global browser usage. It is progressive enhancement by nature: in an older browser the declaration is simply invalid and dropped, so always pair it with a sensible default value declared first. The test at the top of this page checks your actual browser rather than a version chart, because channels, flags and embedded webviews do not always match the headline numbers.
What typed arithmetic still cannot do
Multiplying two typed values stays invalid — calc(10px * 2px) would be square pixels, which no property accepts. Division by a value of a different type is equally invalid: a length divided by a time would be a speed, and CSS has no speed type. The playground above lets you feel these edges safely: try breaking an expression and watch your browser reject it.
How to use this tool
- Click Test My Browser — the probes run automatically on load, too. Each probe asks your browser to compute a real typed expression.
- Read the probe table: green ticks mean same-type division, viewport-as-number and ratio-driven angles all work on this device.
- Watch the live bar: it is faded by pure CSS typed arithmetic. Resize the window and compare it with the JavaScript-computed ratio beside it.
- In the playground, pick a preset or write your own calc(), choose a property, and hit Apply to see the resolved value your browser computes.
- Copy the support report if you need it for a bug report or a team compatibility check.
Frequently Asked Questions
Related Tools
CSS calc() Validator
Check any calc() expression for type errors, division mistakes and spacing bugs.
CSS Unit Division Calculator
Divide CSS units, watch types cancel, and convert between units with context.
Responsive CSS Formula Generator
Build viewport-to-property formulas visually and copy the calc() code.
Check Out Other Popular Tools
Sandbox Kit Permission Inspector
Paste a Docker Sandbox Kit descriptor and see what it can access: network, credentials, host mounts and lifecycle commands, with a risk score and plain words explanations. Parsed locally in your browser.
Reverse Lines
Free online tool to instantly reverse the order of lines in your text or lists. Flip paragraphs upside down securely in your browser.
Spelling Worksheet Generator
Turn any word list into a printable spelling worksheet with write the word lines, a word scramble, and a word search. Free, no signup.
Was this tool helpful?
Comments
Loading comments...