無料&即時 — 登録不要でご利用いただけます

Pixel Ratio Calculator

The Pixel Ratio Calculator converts between CSS pixels and physical (device) pixels using the device pixel ratio (DPR). Calculate the actual rendered resolution on Retina and HiDPI displays, and determine optimal image sizes for crisp rendering.

Pixel Ratio Calculator — リアルタイム比率プレビュー
Physical Pixels
A
B
⚖️
Proportion Solver
A : B = C : D — Enter any 3 values
:
=
:
📊
Results
Visual ratio breakdown
Solved Proportion
Simplified
Percentages
Decimal
Fraction
Visual Ratio
A
B
Part A: —
Part B: —
    Ratio Simplifier
    Reduce any ratio to its simplest form
    :
    📊
    Simplified Result
    Reduced to lowest terms
    Simplified Ratio
    GCD Used
    Percentages
    Decimal Ratio
    Fraction
    Visual Ratio
    A
    B
    Part A: —
    Part B: —
      📐
      Ratio Scaler
      Multiply a ratio by a scale factor
      :
      ×
      📊
      Scaled Result
      Ratio after scaling
      Scaled Ratio
      Original
      Factor
      Percentages
      Simplified
      Visual Ratio
      A
      B

        🕐 Recent Calculations

        📭
        No calculations yet. Start computing above!

        What is Pixel Ratio?

        Device pixel ratio (DPR) is the ratio of physical pixels to CSS pixels on a display. A DPR of 2 (Retina) means each CSS pixel is rendered using a 2×2 grid of physical pixels. A 375×812 CSS viewport on an iPhone at 3× DPR actually renders 1125×2436 physical pixels.

        Understanding DPR is essential for web developers to serve appropriately sized images. A 200×200 CSS image needs a 400×400 source file for 2× displays and 600×600 for 3× displays to appear crisp. Without accounting for DPR, images appear blurry on high-density screens.

        使用される計算公式・方程式

        この計算ツールは5つの主要な公式を使用しています:

        1 Physical Pixels from CSS
        Physical Pixels = CSS Pixels × Device Pixel Ratio

        A 375px CSS width at 3× DPR: Physical = 375 × 3 = 1125 physical pixels.

        2 CSS Pixels from Physical
        CSS Pixels = Physical Pixels / Device Pixel Ratio

        A 2560×1440 display at 2× DPR renders as 1280×720 CSS pixels.

        3 Image Size for Target DPR
        Required Image Size = Display Size (CSS) × Target DPR

        A 300×200 CSS image area needs 600×400 source for 2× DPR, 900×600 for 3× DPR.

        比率計算ツールの使い方

        この比率計算ツールは、以下の3ステップで簡単にご利用いただけます:

        1

        数値を入力

        入力欄に既知の比率の値を入力します。求めたい未知数の入力欄は空欄のままにしておきます。

        2

        モードを選択

        比率モード(解く、簡素化、スケーリング)を選択します。各モードで異なる計算式が適用されます。

        3

        結果を確認

        計算するボタンを押します。結果画面に答えと、視覚的な比率バー、円グラフ、詳細なステップバイステップの解決プロセスが表示されます。

        実例問題と段階的な解説

        本比率計算ツールを使って、以下の3つの例題をステップバイステップで解決するプロセスです:

        入力 1 iPhone 14 Pro: 393×852 CSS at 3× DPR
        1 Physical Width: 393 × 3 = 1179 pixels
        2 Physical Height: 852 × 3 = 2556 pixels
        3 Total pixels: 1179 × 2556 = 3,013,524
        Physical resolution: 1179 × 2556 (~3 million pixels)
        入力 2 Image for 2× and 3× displays
        1 CSS display size: 400 × 300 pixels
        2 2× image: 800 × 600 pixels
        3 3× image: 1200 × 900 pixels
        Serve 800×600 for 2× and 1200×900 for 3× displays
        入力 3 Calculate DPR from screen specs
        1 MacBook Pro: 3024×1964 physical pixels
        2 Displayed as 1512×982 CSS pixels
        3 DPR = 3024/1512 = 2.0
        Device pixel ratio is 2.0 (Retina)

        よくある質問 (FAQ)

        What is device pixel ratio (DPR)?

        DPR is the ratio between physical display pixels and CSS (logical) pixels. DPR 1 = standard displays. DPR 2 = Retina/HiDPI (Apple, many laptops). DPR 3 = high-end phones (iPhones, Samsung flagships).

        How do I find my screen's pixel ratio?

        In a browser, open the console and type window.devicePixelRatio. Common values: 1 (standard monitors), 1.25 or 1.5 (Windows scaling), 2 (MacBook Retina), 3 (iPhone Pro).

        Why do images look blurry on Retina displays?

        A 200×200 pixel image displayed at 200×200 CSS on a 2× DPR screen is stretched to 400×400 physical pixels, causing blur. The solution: use a 400×400 source image to match the physical pixel count.

        How does pixel ratio affect website performance?

        Higher DPR images are larger files (4× file size at 2× DPR). Use responsive images (srcset attribute) to serve appropriately sized images based on DPR, balancing quality and page load speed.

        What is the pixel ratio for 4K monitors?

        A 4K (3840×2160) monitor at native resolution has DPR 1.0. With Windows scaling at 150%, effective DPR ≈ 1.5. At 200% scaling (common on 27" 4K), DPR = 2.0, rendering content at 1920×1080 CSS pixels.

        比率の理論を学ぶ

        比率とは具体的に何ですか?

        比率とは、2つ以上の数量の大きさを互いに比較して相対的な割合を表した数値です。記号では A : B のように表し、「Aの量に対してBの量が対応する」という相互関係を意味します。例えば、3 : 4 の比率は、Aが3つ分配されるときBは4つマッチするという正比例関係を持ちます。料理、工学設計、財務分析など日常のあらゆる場面で使われます。

        比例式はどのように解きますか?

        比例式は、2つの比率の値が等しいことを表す等式です(A : B = C : D)。外項の積(A × D)と内項 of 積(B × C)は常に等しくなります。未知数 D を求めるには、内項の積を求め、それをもう一方の外項 A で割ります: D = (B × C) / A。当ツールの比例式解決モードに既知の3つの数値を入力すれば、未知数を即座に算出できます。

        比率はどのように簡単に整理しますか?

        2つの数値の最大公約数(GCD)を求めた後、両方の数値をその最大公約数で割って約分します。例えば 24 : 36 の場合、24と36の最大公約数が 12 なので、両方を 12 で割ると最も簡単な自然数の比である 2 : 3 になります。比率計算ツールがGCDの算出と約分を自動的に処理します。

        比率のスケーリングはいつ使用しますか?

        比率の関係を崩さずに全体の分量を増やしたり減らしたりするときに使用します。例えば、2 : 5 の割合の材料があるとき、両方に 3 を掛ければ 6 : 15 になり、同じ比重を保ったまま3倍の量の配合物を準備することができます。パン生地の容量変更や、図面の縮尺変更に欠かせません。

        比率と分数の違いは何ですか?

        比率(A : B)は同等の要素同士の大きさの比較(部分対部分)に適しており、分数(A/B)は全体の中である要素が占める割合(部分対全体)を表現することが多いです。ただし、比率 3 : 4 も分数 3/4(小数で0.75)として表現できます。使われる文脈や意味合いにおいてニュアンスの違いがあります。