It depends on the type of test you take:
Antigen/Antibody test from a venous blood sample: 18 to 45 days after exposure.
Antigen/Antibody test from a finger prick sample: 18 to 90 days after exposure.
Antibody Test: 23 to 90 days after exposure.
Nucleic Acid Test (NAT): 10 to 33 days after exposure.
There is no HIV test that can detect HIV immediately after infection. If you think you’ve been exposed to HIV, in the last 72 hours, talk to your health care provider about post-exposure prophylaxis (PEP), right away