That's a useful video clip t9bailey, thanks.
I notice there is a comment on that page
My only question is... how do you know you started to record the two tracks at he exact same moment?
The answer to this is:
Record the first track (I just generate a click track for this as it produces nice distinct timing marks)
Then record that click track as it plays from track one onto track two. (this can be done by recording "stereo mix", or simply placing your microphone close to the computer speakers)
You then have a copy of track one on track two, and any difference in the position along the time line is a clear indication of the latency that needs to be corrected.

- The offset been track 1 and track 2 indicates the latency that needs to be corrected.
- Screenshot.png (44.66 KiB) Viewed 1296 times
By zooming in on the selected region, we can adjust the selection and read the necessary correction more accurately.

- Zooming in on the selected area allows more precise measurement.
- zoom in.png (4.21 KiB) Viewed 1296 times
In the second image, we can see that the necessary latency correction is -87 milliseconds (minus 87).
in
Audacity 1.3.5, Latency correction is handled automatically, though you can still adjust it in preferences to get it more accurate. This screen shot shows the default (automatic) adjustment in Audacity 1.3.5,
The little arrows at the beginning of track 2 (see illustration) indicate that part of track 2 has become hidden behind the "time=0" start point, due to the latency correction that has automatically shifted the recording a little to the left to compensate for latency.
You can see in this image that the automatic settings have worked rather well and the two tracks are within a few milliseconds. This slight inaccuracy is virtually unnoticeable, but if I were to be really fussy, I could make a manual adjustment in preferences to adjust it a little.

- Audacity 1.3.5 with automatic latency correction.
- Audacity 1-3-5.png (6.07 KiB) Viewed 1297 times
This is all fine, so long as the latency remains constant throughout the recording.
On expensive sound cards designed for music, the manufacturers go to great lengths to assure that the latency is not only very short, but also remains at a constant amount over long time periods. The very best cards will have latency of just a few milliseconds, that even after a long recording will still remain in synchronisation. Unfortunately this is not true of cheaper, or general purpose sound cards, which in the worst cases can drift quite markedly over just a few minutes of recording. Such timing variations are beyond the control of Audacity, or any other software.
However, even relatively inexpensive sound cards can usually produce sufficiently accurate timing for all but the most exacting purposes. For example, my old SoundBlaster Live Value (PCI sound card - obsolete, but second-hand value of about $5) will remain within about 0.01 (a hundredth) of a second over a 5 minute recording.