Here’s my “easy way” to set up latency correction…
Firstly, ensure that the prerequisites are all in place:
- Does Audacity record via the microphone? If yes, proceed, else fix this first.
- Can I hear the recording through my headphones when I play it back? If yes, proceed, else fix this first.
- Can I hear myself through my headphones without a delay or echo? If yes, proceed, else fix this first.
- Can you record a second track (shift + R) and hear the first track play while the first track is recording? If yes, proceed, else fix this first.
So when that’s all working, move on to latency correction:
a) “Edit menu > Preferences > Devices” → Set “Track shift after record” to 0 (zero). Then click OK. (Buffer length should normally be about 100, but don’t adjust this if microphone recording is working OK)
b) Generate a 30 second click track with “Generate menu > Rhythm track”. Set the “Beat sound” to “Ping”.
c) Place you headphones close to the microphone (as in Koz’s previous image, and press “Shift + R” to start recording to a new track.
d) Allow the recording to run for 6 or 7 seconds, then stop the recording (spacebar).
You should now have a recording that looks something like this:

Note that the clicks in the newly recorded track are after the clicks in the original track.
e) Zoom in on one of the strong beats, and select from the start of that strong beat in the first track, to the start of the strong beat in the recoded track, like this (click image to expand):

Note that the “Length of selection” in my example is 188 ms (your will probably be different).
This is our initial measurement for the amount of “round trip” latency.
Because we need to shift the newly recorded track to the left (earlier), we need to adjust the position by -188 ms (minus one hundred and eighty eight).
f) “Edit > Preferences > Devices” → Set “Track shift after record” to the negative of the measurement. (In my case, I set it to “-188”). Press OK to close the Prefs window.
g) Ctrl + Z to undo the recording.
h) Select the first track and set it to “Solo” (click the track “Solo” button).
i) Shift + R to record a new track, then stop after a few seconds.
j) Repeat step (i) so that you have several tracks one above the other like this:

Note that it is normal for there to be a little variation from one track to the next, but with a reasonable sound card the variation should be small, perhaps varying by around +/- 1 ms.
- If the average position of each click in the recorded tracks line up with the original track, you’re done.
- If the average position is a millisecond later than the original, then you need to tweak the “Track shift after record” amount by another -1 ms (in my case that would be -189).
- If the average position is a millisecond earlier than the original, then you need to tweak the “Track shift after record” by +1 ms (in my case that would be -187).
If there is more than a few ms variation in the recorded track positions, then something is wrong with your sound card.