Just to clarify, we’re not talking about eggs that were cracked before you bought them, since in this case, you don’t know how long the eggs were cracked. The USDA advises that you should never buy cracked eggs (source).
How Long Can Opened Eggs Last in the Fridge?
According to the United States Department of Agriculture (source) and FDA (source, page 70)
you can keep an opened raw egg (whites, yolks) in the fridge (40° F / 4° C) in an airtight container, and it should last 2-4 days.
How Long Can Cracked Eggs Last in the Fridge?
The USDA has specifically addressed cracked eggs. If you crack an egg on your way home, they advise that you break it to a clean container, cover it tightly, put it into the fridge, and use it within 2 days (source).