FourierTools

CSV to Spectrum

Find the frequencies in evenly spaced samples. Your data stays in this browser.

One value per line, or two columns in the order time (seconds), value. Optional header: value or time_s,value. Use 2–32,768 samples.

Find the sampling rate from CSV timestamps

Amplitude spectrum

Calculate the spectrum to see the result for these inputs.

How to read the spectrum

Each bin is at k × sampling rate / sample count. The one-sided linear magnitude is |DFT| / sample count, doubled for bins with a negative-frequency partner. DC and the Nyquist bin for even sample counts use the undoubled magnitude.

The calculation keeps the mean and uses a rectangular window with no padding. A sine centered on a bin reads its peak amplitude in the original signal units. Energy from tones between bins spreads across neighboring bins.

The example has 128 samples at 1,024 Hz. Its 128 Hz sine has peak amplitude 2 and bin spacing 8 Hz.

Find the sampling rate from CSV timestamps

A sensor log has eight readings at 1200, 1205, 1210, …, 1235 milliseconds. What goes in the sampling rate field, and where should a repeating signal appear on the frequency axis?

Convert the 5 ms interval to hertz

Subtract adjacent timestamps. Each gap is 5 ms, or 0.005 seconds. The sampling rate is 1 ÷ 0.005 = 200 Hz. You can also check the endpoints. Eight readings span seven gaps, so (1235 − 1200) ÷ 7 gives the same 5 ms interval.

Prepare the time column in seconds

Subtract the first timestamp from each timestamp and divide by 1000 to get elapsed seconds. Keep the measured values in their original units. Paste the following CSV into Sample data, enter 200 for Sampling rate and choose Calculate spectrum.

time_s,value
0.000,3
0.005,1
0.010,-1
0.015,1
0.020,3
0.025,1
0.030,-1
0.035,1

Check the 50 Hz peak

The values repeat every four samples. One cycle takes 4 × 5 ms = 20 ms, which gives 50 Hz. With eight samples, the FFT bin spacing is 200 ÷ 8 = 25 Hz. Open Inspect a frequency bin. Bin 2 is at 50 Hz with peak amplitude 2. Bin 0 reads 1, the average of the eight values.

If the calculator flags a time step, compare the two timestamps around the named row. Here every gap should be 0.005 seconds. A gap of 5 in the time column suggests milliseconds still need converting. A gap of 0.010 seconds among 0.005-second steps suggests a missing reading. Check the source log or select a continuous, evenly sampled segment.