Sine Wave Generator
Play a pure sine tone, see the wave on a labelled graph and change its frequency, amplitude and phase. Save the result as a WAV file, a PNG graph or a table of values for your code.
Equation
y(t) = sin(2π · 440 · t)
Textbook form: y = a · sin(b · (x − c)) + d
with a = 1, b = 2764.6 rad/s, c = 0 s, d = 0
Wave
Amplitude and offset change the graph and the equation only. Phase moves the curve, but a single tone sounds the same at any phase.
Sound
Wave facts
- Frequency
- 440 Hz
- Period
- 2.27 ms
- Angular frequency
- 2764.6 rad/s
- Peak to peak
- 2
- RMS
- 0.7071
- Phase
- 0° (0 rad)
- Time shift
- none
- Wavelength in air
- 78 cm
- Nearest note
- A4
- Output level
- -20 dBFS
Save or reuse the wave
Trims the length to whole cycles so a loop does not click. Turns the fade off.
5 s, 44.1 kHz, 16-bit, mono, 431 KB
The file uses the frequency, phase, volume and output side from above. It ignores amplitude and offset.
One cycle of sin(x + phase), scaled to the range you pick. It uses the current phase and ignores amplitude and offset.
Rate Sine Wave Generator
How useful was this tool? Your rating helps others find it.
Sine wave generator with sound, graph and export
This sine wave generator plays a pure sine tone and draws the same wave on a labelled graph. Change the frequency, the amplitude, the phase and the vertical offset, and the sound, the picture and the equation change together. Use it as an online sine tone generator, as a sine wave graph for homework, or as a quick way to make a test signal.
The graph reads like an oscilloscope. The time axis adjusts to the frequency, so a 20 kHz wave and a 1 Hz wave both fill the screen with a few clean cycles. Switch to the angle axis to see the textbook sine curve in radians and degrees. Move the pointer over the graph to read the exact value at any point.
What frequency, amplitude, phase and offset do
Four settings describe every sine wave. The table shows what each one changes on the graph and in the formula y = A · sin(2πft + φ) + d.
| Setting | What it changes | Symbol |
|---|---|---|
| Frequency (Hz) | How many cycles fit in one second. A higher frequency packs more cycles into the same time and raises the pitch. | f |
| Amplitude | The height of the wave, from the midline to the peak. On the graph it stretches the curve up and down. | A |
| Phase (degrees) | How far the curve is shifted along the time axis. A positive phase moves it to the left. A shift of 360 degrees is one full cycle. | φ |
| Vertical offset | Moves the whole wave up or down without changing its shape. The dotted line marks the new midline. | d |
Sine wave equation and the textbook form
In physics and electronics, the wave is written as y(t) = A · sin(2πft + φ) + d. Maths classes use the form y = a · sin(b · (x − c)) + d. Both describe the same curve, and they connect like this: a equals A, b equals 2πf (the angular frequency), c equals −φ / b, and d stays the same. The tool shows both forms with your own numbers under the graph.
A 440 Hz wave with an amplitude of 1 has a period of 2.27 ms, an angular frequency of 2764.6 rad/s and a wavelength of 78 cm in air at 20 °C. Change the frequency and the Wave facts panel recalculates the period, the angular frequency, the RMS value, the wavelength and the nearest musical note. On the angle axis, b equals 1 and x is measured in radians, so the curve repeats every 2π.
Save the wave as audio, an image or code
WAV file
Download up to 60 seconds of the tone as a 16-bit WAV file at 44.1 kHz or 48 kHz. Choose the left channel, the right channel or both, add a short fade, or trim the file to whole cycles so it loops without a click.
Graph image
Save the current graph as a PNG with a white background. The axes, the labels, the period bracket and the amplitude marker are included, so you can paste it straight into a report or a slide.
Table of values for code
Get one cycle as a lookup table with 16 to 1024 samples. Choose 8, 10, 12 or 16 bits, signed, unsigned or float values, and copy the table as a C array, an Arduino PROGMEM table, a Python list or CSV. Microcontroller projects use these tables to drive a DAC or a PWM output.
Common test tones and what they are for
Each preset under Frequency matches a tone that people use for a reason.
| Tone | What it is used for |
|---|---|
| 20 Hz | The lower edge of human hearing. Most speakers cannot play it, but you can see it on the graph. |
| 50 Hz and 60 Hz | The frequency of mains power: 50 Hz in most of Europe, 60 Hz in the United States, Canada and Mexico. The hum from poorly shielded audio gear sits at this pitch or at twice it. |
| C4 (261.63 Hz) | Middle C on a piano. |
| A4 (440 Hz) | The standard tuning pitch. Orchestras and tuners use it as a reference. |
| 1 kHz | The usual reference tone for setting levels and testing equipment. Almost every device plays it well, and the ear hears it clearly. |
| 5 kHz | Sits in the range where the ear is most sensitive, so it sounds sharp even at low volume. |
| 15 kHz | Close to the upper limit for many adults. Use it at low volume to test how high your hearing and your speakers reach. |
Listen safely
Start quiet
The tool starts at a low volume. Raise it slowly. A pure tone has no gaps and no changes, so it feels louder and more tiring than music.
Take care with high pitches
Above 16 kHz many adults hear little, which makes it easy to turn the volume up too far. Keep the volume low and stop if you feel pressure or pain.
Protect your speakers
Very low tones at high volume push small speakers hard, and loud high tones can damage tweeters. Do not leave a tone running without watching it.
How the sine wave generator works
The generator draws the curve y = A · sin(2πft + φ) + d on a canvas, with more than one point for every pixel, so the line stays smooth at any zoom. The horizontal axis shows time in microseconds, milliseconds or seconds, or the angle in radians and degrees. For sound, the browser creates a sine oscillator with the Web Audio API and ramps the volume up and down over a few milliseconds, which avoids clicks. WAV files are written in the browser: each sample is the sine value at that moment, multiplied by the volume and stored as PCM audio. Nothing is sent to a server.
How to use the sine wave generator
Set the wave
Type a frequency in hertz or pick a preset such as 440 Hz or 1 kHz. Then set the amplitude, the phase and the vertical offset. The graph and the equation update as you type.
Read the graph
Switch the horizontal axis between time and angle, and choose how many cycles to show. Move the pointer over the graph to read the value at any point.
Play or save it
Press Play tone and set the volume. To keep the wave, download a WAV file, save the graph as a PNG, or copy a table of values for C, Arduino or Python.
Example Usage
A 440 Hz tone, the standard tuning pitch:
Frequently Asked Questions
What is a sine wave?
What do amplitude, frequency and phase mean?
What is the formula for a sine wave?
What is the difference between a sine wave and a cosine wave?
How do I find the period from the frequency?
Can I download a sine wave as a WAV file?
Do amplitude and phase change what I hear?
What is 440 Hz, and which frequency should I use for a test?
Why can I not hear very low or very high frequencies?
Is it safe for my ears and my speakers?
What is the difference between a sine wave and a square or triangle wave?
Does the tool upload my settings or my audio?
Related Tools
Online Vibration Simulator
Turn your device into a massager! intense vibration patterns for relaxation and testing.
Line Graph Maker
Create beautiful line graphs for presentations and download as PNG.
Online Tone Generator
Generate pure audio tones and test frequencies. Sine, Square, Sawtooth waves for audio testing and tinnitus relief.
White Noise Generator
Generate soothing white, pink, or brown noise for focus, sleep, and relaxation with timer controls.
Online Sound Test for Speakers and Headphones
Run a free online sound test for speakers and headphones. Check left and right audio, stereo balance, bass, treble, and white noise directly in your browser.
Bass Test
Test how low your speakers, headphones, or subwoofer can really go. Play 12 standard bass frequencies from 20 Hz to 250 Hz and find your setup's lowest audible frequency.
Comments
Comments are provided by Disqus. Loading them connects to Disqus, which sets cookies and processes data under its own privacy policy.
The Sine Wave Generator is maintained by CodeItBro. We aim to provide the best free developer tools on the web. If you have feedback or suggestions, please visit our contact page.

