FFT from CSV: free online FFT and PSD calculator
FFT and PSD of any CSV column, in your browser. Free, and nothing is uploaded.
Open a CSV to see its spectrum
Drop it here or choose a file. Then pick the FFT spectrum or the PSD.
The sample: 50 Hz and 120 Hz tones with noise, 1,000 readings a second.
Tip: drop several files to compare them.
Your file never leaves your device. It is read and charted by your browser. Nothing is uploaded.
First you choose: FFT spectrum or PSD
When a file opens, you choose FFT spectrum (amplitude) or PSD (Welch, per Hz), and its settings open on the plotted channel. The buttons over the plots open the other one at any time. Both start from these defaults, and you can change each one in the dialog:
- PSD (Welch)
- Hann window; segments of 4,096 samples, or for a file with fewer rows the largest power of two up to half of them (1,024 for the 4,000-row sample); 50 % overlap; density scaling, in unit²/Hz; one-sided, from 0 Hz to half the sample rate; each segment’s mean removed; the segments averaged.
- FFT spectrum
- Rectangular window; peak amplitude, so a sine of amplitude 1 reads 1; no trend removed; every sample, not padded to a power of 2.
At a glance
- FFT spectrum
- Single-sided spectrum of the whole signal as peak amplitude, RMS amplitude or power. Windows: rectangular (the default), Hann, Hamming, Blackman and flat top. Remove the mean or a linear trend first, use every sample (true amplitudes) or pad to the next power of 2, and show the result in dB.
- PSD (Welch)
- Power spectral density averaged over overlapping segments (Welch’s method): segment length (4,096 samples by default; a file with fewer rows starts at the largest power of two up to half of them), overlap (50 %), window (Hann by default) and scaling per Hz or as a power spectrum, in linear units or dB.
- Grms
- The RMS of the signal from its PSD, over every frequency or a band you choose, shown next to the plot and editable on it.
- Peak table
- The highest peaks of the spectrum, highest first, with their frequency and value (for a PSD, also the Grms of each peak), marked on the plot. The top 5, 10 or 20, to copy into a spreadsheet or download as CSV.
- Sample rate
- Read from the time column when its steps are even, with a warning when they are not. With no time column, you type it in.
- Units
- Taken from the channel: a signal in g gives a PSD in g²/Hz, an amplitude in g and a Grms in g. Frequencies are in Hz.
- Gaps
- Empty cells are bridged by a straight line before the spectrum is calculated.
- More
- Transfer functions (H1, H2) with coherence, spectrograms, band signal-to-noise ratio, filters and formulas, in the same Math dialog.
- Accuracy
- Checked against SciPy: 55 checks of the FFT spectrum and the PSD, all passing.
- Processing
- Calculated in your browser. Your file is never uploaded.
- Price
- Free. No account or sign-up.
How to calculate an FFT or PSD from a CSV file
- Open your CSV file. Drop a CSV, TSV, TXT, Excel, JSON, MATLAB, Parquet, HDF5 or LabVIEW TDMS file with a time column and one or more signal columns onto the tool at the top of this page, or click “Choose a file”. No file to hand? Click “Try a sample signal”.
- Choose the FFT spectrum or the PSD. As soon as the file is read, choose “FFT spectrum (amplitude)” or “PSD (Welch, per Hz)”. Its settings open on the plotted channel; pick another channel if you like. The sample rate is read from the time column and shown, for example “Sample rate: 1000 Hz from the time column”; without a time column, type it in.
- Open the spectrum and read it. Click “Open plot”. The spectrum appears as a plot of its own, with a table of its highest peaks next to it and image and CSV downloads; a PSD also shows the Grms of the whole range or of a band you type in. The buttons over the plots open the other one at any time.


A worked example you can check
“Try a sample signal” opens a made-up file of 4,000 readings taken 1,000times a second. Its signal_a column holds a 50 Hz sine of amplitude 1, a 120 Hz sine of amplitude 0.5, random noise (standard deviation 0.25) and a step of 1.5 at 2 seconds. It is the same file we check our maths against SciPy with. Choose PSD (Welch, per Hz), click Open plot without changing anything, and this is what you should get:
| Channel | signal_a, sample rate 1000 Hz from time_s |
|---|---|
| Window | Hann |
| Segment length | 1,024 samples (the default 4,096 is longer than the file) |
| Overlap | 50 % (512 samples): 6 segments averaged |
| Scaling | Density (per Hz), one-sided, each segment’s mean removed |
| Frequency step | 1000 ÷ 1024 = 0.977 Hz |
| First peak | 49.80 Hz, PSD 0.319 per Hz |
|---|---|
| Second peak | 120.12 Hz, PSD 0.0833 per Hz |
| Grms, all frequencies | 0.8786 |
| Grms 45–55 Hz | 0.7013 (the tone alone: 0.7071) |
| Grms 115–125 Hz | 0.3533 (the tone alone: 0.3536) |
The peaks sit on the frequency steps nearest 50 Hz and 120 Hz, and they are the first two rows of the peak table next to the plot. A band around each tone gives that tone’s RMS, its amplitude divided by √2, give or take the noise in the band. The step at 2 seconds adds power below a few hertz: the rise at the left of the plot. The sample has no unit, so the PSD is per Hz; a signal in g gives a PSD in g²/Hz and a Grms in g.
The same in Python
With the sample file downloaded, these lines give SciPy’s answer for the same settings:
import numpy as np, pandas as pd
from scipy import signal
x = pd.read_csv("megarows-sample-signals.csv")["signal_a"].to_numpy()
f, p = signal.welch(x, fs=1000, window="hann", nperseg=1024, noverlap=512)
print(f"Grms {np.sqrt(np.trapezoid(p, f)):.4f}")
k, _ = signal.find_peaks(p)
for i in sorted(k[np.argsort(p[k])[-2:]]):
print(f"peak {f[i]:.2f} Hz PSD {p[i]:.3g}")They print:
Grms 0.8786
peak 49.80 Hz PSD 0.319
peak 120.12 Hz PSD 0.0833We ran them on 8 October 2026 with NumPy 2.1.3, SciPy 1.14.1, pandas 2.2.3 and Python 3.12. A test runs the same calculation through MegaRows on every change to the site and checks that its numbers are the ones on this page, and that they match SciPy’s to about 12 significant digits. Download the sample file (CSV, 185 KB).
FFT, PSD and Grms: what you get
FFT spectrum
The amplitude of every frequency in the whole signal, from 0 Hz up to half the sample rate. Choose peak amplitude (a 1 g sine shows as 1 g), RMS amplitude or power, and a window: rectangular, Hann, Hamming, Blackman or flat top. The mean or a straight-line trend can be removed first. By default every sample is used, which keeps amplitudes true; padding to the next power of 2, as some tools do, is there as an option.
Power spectral density (Welch)
The signal is cut into overlapping segments (by default 4,096 samples, fewer for a short file, with 50 % overlap), each is windowed and transformed, and the results are averaged. That smooths out the noise of a single spectrum, which is why a PSD is the usual way to look at vibration. The result is in unit²/Hz, or in dB.
Grms
The overall level of a random vibration: the square root of the area under the PSD. The result plot shows it for every frequency, and for any band you type in.
Peak table
Next to the plot, a table lists the spectrum’s highest peaks, highest first: the frequency of each and its value, and for a PSD the Grms of each peak, from the dip on its left to the dip on its right. It shows the top 5, or 10 or 20, and copies into a spreadsheet or downloads as CSV; the peaks are numbered on the plot, and a click on a row picks one out. A peak counts when it stands at least 3 dB above the dips either side, and two peaks are at least 3 frequency steps apart.
Sample rate and units
The sample rate comes from your time column when its steps are even, and the dialog says which column and what rate it found. A column of times in seconds, or of dates and times, both work. Without a time column, type the rate in. Units come from the channel, for example from a units row under the header: a signal in g gives a PSD in g²/Hz.
PSD for vibration: g, g²/Hz and Grms
Accelerometer data is usually in g. Give the column its unit in a units row under the header (g or [g]) and the PSD comes out in g²/Hz and the Grms in g, the units of a random-vibration test specification. The PSD uses every sample of the channel.
- The Grms of a band: type the band, such as 20 to 2,000 Hz, into Grms band in the dialog, or into the From and To boxes on the PSD plot. The Grms is the square root of the area under the PSD in that band.
- The highest frequency is half the sample rate. A file logged 1,000 times a second shows up to 500 Hz, so a band up to 2,000 Hz needs at least 4,000 readings a second.
- Frequency step and smoothness: the step is the sample rate divided by the segment length (1,000 ÷ 4,096 = 0.24 Hz). Longer segments give finer steps but fewer segments to average, so a noisier PSD; shorter segments give the opposite.
- Tones in random vibration: a sharp peak is a tone, such as a motor’s running speed. Its Grms over a narrow band is the tone’s RMS, as in the worked example above.
Checked against SciPy
526 checks, all passing. We ran every calculation in the Math dialog, with every option it offers, through MegaRows and through NumPy and SciPy, the standard scientific libraries for Python, on the same sample file with the same settings, and compared every output value. See every check.
- FFT spectrum and PSD: 55 checks across every window, scaling and option. The largest difference was 1.5 × 10⁻¹⁴ of the size of the result: the numbers agree to about 13 significant digits.
- Every operation: in 341 of the 526 checks the numbers are identical to the last digit. The largest difference anywhere was 1.2 × 10⁻¹¹ of the size of the result, far below anything you could see in a plot or a table.
- Tolerances: a check passes when the difference is at most 10⁻¹² of the result for spectra, sums and statistics (less for single functions such as log or sin), and 10⁻¹⁰ for the filters, which design their own coefficients.
A few results follow a different convention from the library default on purpose, such as rounding 2.5 up to 3 like Excel; the comparison uses the same convention on both sides. How we check our maths lists every check, with the reference call and the largest difference.
Private by design: nothing is uploaded
Test data is often confidential. This tool reads your file and calculates the spectrum in your browser, so the file and its name never leave your device; you can check it in the Network tab of your browser’s developer tools while the file opens. Read the privacy statement for details.
Need the signal itself rather than its spectrum? The CSV plotter opens the same files with zoomable charts and statistics, and our guide shows how to plot a CSV file with millions of rows.
More for measured signals
- PSD calculatorPower spectral density (Welch) in g²/Hz, with the Grms of any band and of each peak.
- Spectrogram from CSVHow the frequencies of a measured signal change over time, as a heat map.
- FRF and coherenceHow an output responds to an input: H1 and H2, phase and coherence.
- How we check our mathsEvery calculation checked against NumPy and SciPy by our own tests.
- CSV plotterPlot the signals themselves, zoom in and read the statistics.
Frequently asked questions
How do I calculate an FFT from a CSV file online?
Open the CSV in the tool at the top of this page and choose “FFT spectrum (amplitude)”. Its settings open on the plotted channel: check the channel and the window, and click “Open plot”. The sample rate comes from the time column. Nothing is uploaded and there is nothing to install.
What is the difference between the FFT spectrum and the PSD?
The FFT spectrum shows the amplitude of each frequency in the whole signal, in the signal’s own unit: best for clear tones, such as a 50 Hz hum. The PSD (power spectral density, Welch’s method) averages the spectra of overlapping segments and divides by the frequency step, in unit²/Hz: best for random signals such as vibration, and the basis of a Grms value.
How is the sample rate found?
From the time column: when its steps are even, the dialog shows the rate it found, for example “Sample rate: 1000 Hz from the time column”. Uneven steps get a warning. If the file has no time column, the X axis is the row number and you type the sample rate in.
Which window should I use?
Hann is a good default for a PSD of random data. For the amplitude of a single tone, a flat top window reads the amplitude most accurately; the rectangular window keeps the finest frequency resolution when the signal fits the record exactly. Blackman and Hamming are also available.
How do I get Grms from a PSD?
Open a PSD (Welch). The result plot shows the Grms over every frequency; type a band into its From and To boxes to get the Grms of that band, or set a Grms band in the dialog before you open the plot. The Grms is the square root of the area under the PSD.
Does a log frequency axis change the FFT values?
No. Log X above the result plot changes only how the frequency axis is drawn: the values, the peak table and the CSV download stay the same. The 0 Hz value can’t sit on a log axis, so it is left out of the drawing while Log X is on.
Do I need an FFT if my CSV already has frequency and amplitude columns?
No. An FFT turns a time signal into a spectrum, and a file of frequencies and amplitudes is a spectrum already. Open it in the CSV plotter with the frequency column as X and tick “Log scale, X”, as the guide to plotting frequency data on a log X axis shows.
Are the results accurate?
They are checked against SciPy, the standard scientific library for Python. Every calculation in the Math dialog was run through both on the same sample file with the same settings: 526 checks, all passing. For the FFT spectrum and the PSD the largest difference was 1.5 × 10⁻¹⁴ of the size of the result.
Is my data uploaded?
No. The file is read and the spectrum is calculated by your browser, on your own device. Neither the file nor its name is sent to a server, which keeps unreleased test data private. You can check it in the Network tab of your browser’s developer tools.
How long a signal can I analyse?
Files with millions of rows open in seconds, and the FFT and PSD run on every sample of the channel. The practical limit is your device’s memory; a progress bar shows long calculations, and you can cancel them.
Related tools and guides
- CSV plotterOpen a CSV, Excel, TXT, JSON, MATLAB, Parquet, HDF5 or LabVIEW TDMS file with millions of rows and plot it in several linked charts, with zoom and statistics. Works today.
- Large CSV viewerOpen a CSV with millions of rows in your browser: scroll every row, see each column’s type and statistics, chart any column. Works today.
- MATLAB .mat file viewerOpen v4 to v7.3 .mat files without MATLAB and plot any signal. Works today.
- Parquet viewerOpen large .parquet files, see the schema at once and plot millions of rows, without Python. Works today.
- TDMS viewerOpen .tdms files from LabVIEW, DIAdem and DAQmx loggers: every group, channel and property, each channel plotted against its time. Works today.
- HDF5 viewerOpen .h5, .hdf5 and NetCDF-4 .nc files: every group, dataset and attribute, each group’s datasets plotted against their time. Works today.
- MAT to CSVConvert the signals of a .mat file, v4 to v7.3, to a CSV for Excel or Python, without MATLAB. Works today.
- Parquet to CSVConvert a .parquet file to CSV in your browser, with the columns you pick. Works today.
- TDMS to CSVConvert the channels of a .tdms file to CSV, a group at a time, with its time column, without LabVIEW or Excel add-ins. Works today.
- HDF5 to CSVConvert the datasets of an .h5 or NetCDF-4 file to CSV, a table at a time, with its time column, without Python. Works today.
- Excel to CSVConvert any sheet of an .xlsx or .xlsm workbook to CSV, with the saved results of formulas, real dates and 15 significant digits. Works today.
- JSON to CSVConvert JSON and JSON Lines files to CSV: nested fields become columns named by their path, arrays stay as JSON text. Works today.
- CSV to MATConvert a CSV, Excel, JSON or Parquet file to a MATLAB .mat file: a field per column, with names and units, every row. Works today.
- Merge CSV filesAppend many CSV files into one, even with different columns or separators. Works today.
- Split CSV filesSplit a CSV too big for Excel into parts of 1,000,000 rows, parts of a size you choose, or one file per value of a column. Works today.
- CSV row counterCount the lines in a CSV, TSV or TXT file of any size. Works today.
- CSV statisticsCount, missing values, min, max, mean, standard deviation, RMS and peak to peak of each number column, for the whole file or the rows you zoom into. Works today.
- CSV histogramA histogram of any number column, with automatic bins or 10 to 200 of them, and each bin’s count as a table. Works today.
- CSV too large for Excel?Open every row of a CSV beyond Excel’s 1,048,576-row limit, or work around the limit in six other ways.
- PSD calculatorTurn a vibration column into a power spectral density (Welch) in g²/Hz, with the Grms of any band and a dB view. Works today.
- Spectrogram from CSVSee how the frequencies of a measured signal change over time, as a heat map in dB, with the window and range you choose. Works today.
- FRF and coherencePick an input and an output column and get the frequency response (H1, H2, magnitude and phase) and their coherence. Works today.
- The MegaRows toolboxWhat works today and what is coming next, and why nothing is ever uploaded.
Coming soon to MegaRows: CSV to Excel and PDF reports · Compare CSV versions.
MegaRows processes files locally in your browser. Nothing is uploaded, not even the file name.