Favorite places of your favorite city
Home
Add to preferred sources on Google

Fluid Font Size Calculator

Author one fluid font size from two design sizes and viewport widths. Copy root-relative CSS and inspect a model calculated from the same serialized coefficients.

Model size specimen; wraps in this card, not a simulated viewport.

Fluid type

Design sizes and widths

Widths: 240–3840 CSSpx, at least 100 apart. Sizes: 1–256 CSSpx; root: 8–32 CSSpx/rem. Use a decimal point or comma, for example 15.5 or 15,5.

Smaller endpoint

Larger endpoint

CSS and model samples

Increasing

Assumed root 16 CSSpx/rem; coefficients have six-decimal precision. The receiving root and viewport can differ.

Modeled size at 960 CSSpx: 24.000 CSSpx

PointViewport CSSpxTarget CSSpxCopied CSS model CSSpx
Smaller endpoint3201616.000
Midpoint960—24.000
Larger endpoint16003232.000
How this CSS is calculated
  • Find the change per viewport pixel: (32 − 16) ÷ (1600 − 320). Multiply by 100 for the vw coefficient.

    (32 − 16) ÷ (1600 − 320) = 0.0125 px/CSSpx × 100 → 1.25 vw

  • Convert the offset and ordered bounds using root 16 CSSpx/rem. Copied coefficients: lower 1 rem, offset 0.75 rem, slope 1.25 vw, upper 2 rem.

    (16 × 1600 − 32 × 320) ÷ (1600 − 320) ÷ 16 → 0.75 rem

    16 ÷ 16 → 1 rem; 32 ÷ 16 → 2 rem

  • At 960 CSSpx the copied coefficients give 24.000 CSSpx after clamping. (0.75 × 16 + 1.25 × 960 ÷ 100)

The specimen is a model, not a viewport. Coefficient rounding can change endpoint values. Test text resizing on the receiving page.

Within roots 8–32 CSSpx/rem and widths 240–3840 CSSpx, six-decimal coefficients differ from the ideal arithmetic by at most 0.0000352 CSSpx; browser rendering is separate.

Values stay in this tool; no saved history or settings-bearing link is added. Copy is explicit. Existing site services and extensions are separate.

Define the size transition

  1. Enter smaller and larger viewport widths in CSS pixels, at least 100px apart, and the font size at each width. Sizes may increase, decrease or stay constant. State the assumed CSS pixels per rem.
  2. Inspect the current declaration and endpoint table. Change the model test width to inspect another point; this changes the model specimen without changing copied CSS or pretending the card is a viewport.
  3. Copy CSS and test it on a non-root element in the receiving page. Its actual root size, viewport, font and zoom behavior matter. Clipboard denial lets you select the same declaration manually.

Understand the expression

The calculator divides the font-size difference by the viewport-width difference to obtain a slope. It multiplies that slope by 100 for the vw term, then converts the offset and numerical size bounds to rem using your assumed root.

Smaller and larger describe viewport widths, not necessarily font sizes. A decreasing design uses a negative viewport coefficient with numerically ordered clamp bounds. Equal font sizes produce a simpler constant rem declaration.

Coefficients are rounded to six decimals with exact halfway values away from zero. The table and test specimen use those copied coefficients, so they can differ slightly from ideal endpoint interpolation. Displayed pixel samples use three decimals and identify rounding.

The root value is a conversion assumption. A receiving page with another root can change both font bounds and transition widths. rem refers to the document root, and vw to the viewport; changing an ordinary div’s width or font size does not simulate either.

Increasing, decreasing and rounded examples

The default design uses 16px at a 320px viewport and 32px at 1600px, assuming a 16px root. It produces clamp(1rem, calc(0.75rem + 1.25vw), 2rem), with a modeled size of exactly 24px at 960px.

Reversing those endpoint sizes produces clamp(1rem, calc(2.25rem - 1.25vw), 2rem). Both bounds stay numerically ordered. Entering 20px at both widths instead produces font-size: 1.25rem; under the same assumed root.

For 17px at 360px and 23px at 1280px, six-decimal coefficients give 17.0000024px at the first width and 20.0000028px at the midpoint in the copied arithmetic model. The endpoint table rounds those samples; it does not claim exact hits hidden behind formatted values.

Authoring and model limits

Viewport widths are integers from 240 to 3840 CSS pixels, at least 100px apart. Font sizes are 1–256 CSS pixels and assumed root sizes 8–32 CSS pixels per rem, with up to two decimals. Signs, units in fields, grouping, exponents and excess precision are rejected rather than silently corrected.

This authors one non-root font-size declaration with rem and vw. It does not import arbitrary CSS, build a type scale, use container units, upload fonts or alter the application’s root stylesheet. The six-decimal error bound belongs to a finite arithmetic model, not browser rasterization.

The specimen applies a calculated pixel size and wraps within its card. It is not a simulated viewport or proof that copied CSS behaves identically on your page. Actual fonts, roots, viewports and browser precision can change the result.

Mixed rem and viewport units do not automatically prove accessible text resizing. Test the receiving page with browser text and zoom settings. The tool provides no universal WCAG badge, fixed pixel-match promise or guaranteed doubling of the font at 200% zoom.

Local numeric authoring without saved settings

The tool adds no upload, remote font request, saved draft history, settings-bearing link or telemetry containing your values. Copy is explicit. Existing site services, extensions and copies you retain are outside a universal privacy or erasure promise.

Fluid font-size questions

Yes. Enter a larger font at the smaller viewport and a smaller font at the larger viewport. The preferred term gets a negative slope, while the first and third clamp arguments remain numerically ordered.

The calculator emits a constant rem font-size declaration. The viewport fields must still meet the same width rules, but the modeled size no longer depends on viewport width.

No. It is only the conversion assumption used to author the expression. The tool never changes the application’s global root font. Copied rem values respond to the receiving page’s actual root.

No. The specimen uses a calculated pixel size at the stated model width and wraps in its card. An ordinary div is not a viewport. Test the copied declaration in a real receiving-page context.

Not necessarily. Some coefficients require repeating decimals and are rounded to six places. Samples use the serialized coefficients, and the finite model has an explicit small error bound; native browser rendering remains a separate check.

This tool authors one font-size declaration on a non-root element using explicit rem and vw terms. Other properties, units, arbitrary CSS import and complete type scales are outside this bounded workflow.

No. The receiving root, viewport changes, bounds and browser settings all matter. Test text resizing and zoom in context; a formula or successful calculator reflow alone does not establish WCAG conformance.

The tool adds no uploaded values, saved history, remote font or settings-bearing URL. Copy is explicit. Existing site services, extensions and retained copies are outside this limited behavior claim.

Sources

References for CSS units, interpolation and text resizing.

Reviewed 13 November 2026.

These references do not certify the exported CSS for a receiving page.

SVG to PNG

Convert a local SVG file or pasted markup into PNG, with explicit dimensions, transparency and bundled fonts.

Open tool — SVG to PNG

CSS Filter Generator

Order and repeat CSS effects, compare a specimen and copy the exact filter declaration.

Open tool — CSS Filter Generator

CSS Button Generator

Style native button states, inspect keyboard focus and copy HTML and CSS.

Open tool — CSS Button Generator

CSS Border Radius Generator

Edit eight corner radii, preview a box and copy CSS in pixels or percentages.

Open tool — CSS Border Radius Generator

CSS Grid Generator

Build a bounded CSS Grid example with editable tracks, placement and named areas. Preview it, copy CSS or HTML and download the same standalone example.

Open tool — CSS Grid Generator

CSS Flexbox Generator

Build a Flexbox example with container and item controls, explicit layout axes, matching CSS and HTML, and a local complete-example download.

Open tool — CSS Flexbox Generator

CSS Text Shadow Generator

Build ordered text shadows, preview plain text and copy exact CSS.

Open tool — CSS Text Shadow Generator

CSS Transform Generator

Compose repeatable 2D CSS transforms, edit px or percentage translation and origin, inspect a reference box and copy the exact current declarations.

Open tool — CSS Transform Generator

CSS Box Shadow Generator

Create ordered CSS box-shadow layers with a live preview and copyable code.

Open tool — CSS Box Shadow Generator

Image Watermark

Add a text or logo watermark to a batch of images, review each result and download individual files or a ZIP.

Open tool — Image Watermark

CSS Gradient Generator

Create linear or radial CSS gradients with editable colors, opacity and stops.

Open tool — CSS Gradient Generator

Color Converter

Convert supported sRGB HEX, RGB and HSL literals with alpha, explicit precision and current code Copy.

Open tool — Color Converter

Image to Text (OCR)

Recognize printed text in local PNG or JPEG images, choose a language and review or correct the result before copying or downloading.

Open tool — Image to Text (OCR)

QR Code Reader

Read one QR code from a local PNG or JPEG and inspect its text or content bytes without opening links.

Open tool — QR Code Reader

Color Contrast Checker

Compare foreground and background colors, adjust opacity and check WCAG numerical contrast thresholds for text and essential interface details.

Open tool — Color Contrast Checker

Print Size & Resolution Calculator

Calculate print dimensions, required pixels and effective PPI with fit or crop.

Open tool — Print Size & Resolution Calculator

Aspect Ratio Calculator

Find a width-to-height ratio or calculate a matching pixel size from one target dimension.

Open tool — Aspect Ratio Calculator

Image Compressor

Try to fit a JPEG, PNG or WebP within a target file size, with measured results and optional smaller dimensions.

Open tool — Image Compressor

HEIC to JPG

Convert supported HEIC photos locally into full-size JPG copies, with quality and background controls and verified individual or ZIP downloads.

Open tool — HEIC to JPG

Image Converter

Convert supported PNG, JPEG and WebP images locally with batch targets, transparency, background and quality controls, then review and download the encoded files.

Open tool — Image Converter

Photo Collage Maker

Arrange local photos in a grid, adjust crops and spacing, and download PNG or JPEG.

Open tool — Photo Collage Maker

Rotate & Flip Images

Rotate or mirror a local batch of static PNG, JPEG and WebP images, then review and download the processed results.

Open tool — Rotate & Flip Images

Image Cropper

Crop one local JPEG, PNG or WebP to exact pixels with visual and numeric controls. Download PNG or JPEG.

Open tool — Image Cropper

Image Resizer

Resize a JPG, PNG or WebP image by pixels or percentage, preview the result and download it.

Open tool — Image Resizer
View all tools in this category