Sample Rate Conversion Ratio Calculator

Get the resampling ratio and output sample count between two rates.

Ad placeholder (leaderboard)

A DSP and audio-post utility that gives you the exact mathematics of moving audio between two sample rates. It reduces the rate ratio to its lowest-term interpolation and decimation factors (L/M) and computes the output sample count and duration — the numbers you need to predict resampler cost and verify a conversion landed on the right length.

How it works

Rational sample-rate conversion upsamples by an integer L, filters, then downsamples by an integer M, where:

L / M = target rate ÷ source rate (reduced to lowest terms)

The reduction uses the greatest common divisor (GCD) of the two rates. For the output length:

Output samples = input samples × (target rate ÷ source rate)

rounded to the nearest whole sample. Duration is unchanged because the new rate plays the new sample count back over the same real time.

Worked example

Converting 48,000 Hz → 44,100 Hz:

  • GCD(48000, 44100) = 300, so the ratio reduces to 147 / 160.
  • A polyphase resampler interpolates by L = 147 and decimates by M = 160 — large, co-prime factors, which is exactly why 48-to-44.1 conversion needs a long filter and more CPU than a 2:1 step.
  • 480,000 input samples (10 s at 48 kHz) become 480000 × 44100/48000 = 441,000 samples — still exactly 10 seconds.

Compare that with 96,000 Hz → 48,000 Hz, which reduces to 2 / 1: a clean decimation by 2 after filtering, far cheaper to compute.

Why the factors matter

  • Small L and M (2/1, 3/2, 4/3) mean a short, efficient filter and lower CPU — these come from staying inside one rate family.
  • Large co-prime L and M (147/160) demand a long polyphase filter; the cost and any filter ringing scale with the factor sizes.
  • Output count rounding. Because the ratio is rational, the output count is rounded to the nearest sample; over long files the duration matches to within a single sample, which the tool reports.

Every calculation runs locally in your browser; nothing is uploaded.

Ad placeholder (rectangle)