Aspect Ratio Calculator & CSS Generator - TikTok/Reels 9:16

Calculate aspect ratios and missing dimensions fast. Runs locallyโ€”no uploads. Includes TikTok/Reels 9:16 presets and CSS aspect-ratio snippets. Calculate now.

:
16:9
1920px
1080px

How to Use

  1. Pick a preset (9:16, 16:9, 4:5) or enter a custom ratio.
  2. Enter either width or height.
  3. Get the missing dimension instantly with a live preview.
  4. Copy the generated CSS aspect-ratio code for your layout.

Core Features

  • TikTok/Reels (9:16): Use vertical presets to validate social video dimensions quickly.
  • Generate CSS aspect-ratio: Generate modern aspect-ratio CSS snippets instantly.
  • Calculate Missing Dimension: Compute width or height automatically while keeping the ratio.
  • Visual Preview: Preview the ratio in a responsive rectangle in real time.
  • Keep it private: Everything runs locally in your browser.

Related Tools

Calculation Logic

  • Formula: [ H = W \times \frac{r_H}{r_W} ] or [ W = H \times \frac{r_W}{r_H} ]
  • CSS example: [ \text{aspect-ratio}: \frac{16}{9} ]

FAQ

What is the aspect ratio for TikTok and Reels?

The standard is 9:16 (vertical). A common resolution is 1080ร—1920. Use the 9:16 preset to verify your dimensions.

How to use aspect-ratio in CSS?

Use aspect-ratio: 16/9;. We generate the snippet and helpful fallbacks for your layout.

Is my data safe (local/privacy)?

Yes. Calculations are local-only with no uploads or server storage.

Is it free? Can I use it for work?

Itโ€™s free and works well for creators and teams aligning video and UI dimensions.

Why do I see 1โ€“2 pixel differences?

Some dimensions require rounding to whole pixels. We round to the nearest integer while preserving the ratio as closely as possible.