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

FIRE Calculator 2026 (Inflation Adjusted) | Retirement Gap Simulator

The 2026 FIRE Calculator (Inflation Adjusted). Simulate real purchasing power, analyze retirement savings gaps, and generate a visual wealth roadmap. One-click CSV export for your Excel or Notion finance dashboard. 100% Private, client-side calculation.

Position Size Calculator - Risk-Based Trade Sizing

Calculate trade position size from account balance, risk %, entry, and stop loss. Runs locally in your browser with no uploads, so you can compare risk scenarios before you trade.

Compound Interest Calculator | Free APY & Investment Chart

Calculate compound interest from principal, recurring contributions, APY, and time. Visualize principal, interest, and final balance with a local interactive chart.

Online Loan & Mortgage Calculator - Instant Amortization Schedule

Use this Loan Calculator / Mortgage Calculator to estimate monthly payment, total interest, and an amortization schedule locally. Enter amount, rate, and term to calculate now with instant charts.

Online Investment & ROI Calculator - Compound Interest Visualizer

Use this Investment Calculator / ROI Calculator to estimate starting capital, monthly contributions, annual return, and inflation-adjusted results locally. Calculate projected returns with an instant compound interest chart, ROI, and yearly schedule.

APR to APY Calculator - Convert Nominal & Effective Rates

Use this APR to APY Calculator to convert between APR and APY locally. Enter a rate, choose compounding frequency, and see the effective interest rate, spread, and frequency comparison instantly.

Profit Margin Calculator - Margin vs Markup Converter

Use this Profit Margin Calculator to calculate gross profit, Markup, Margin, and selling price locally. Enter cost and price, or cost and target margin, then calculate your margins instantly.

CPM & CPC Calculator - Ad Spend and CTR Online Tool

Use this CPM Calculator and CPC Calculator to estimate ad spend, impressions, clicks, CPM, CPC, and CTR locally. Enter budget and target costs to plan campaign scenarios instantly.

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.