Looking at the internet, it seems that they both mean "students". What are the subtle differences between these words? In which contexts is one better to use than the other?
This answer applies considering France and US school systems. Thank you Laurent S. for letting me know it is not the same In Belgium.
As you noticed, the English word student encapsulates the meaning of the two French words: élève and étudiant.
Élève is a broad word, it can mean one that is in middle school, high school or college, or one that learns in a private or public school in general.
Étudiant is more specific, it is used to describe one that is in college.
Étudiant is also a status as of a worker, or retiree.
So in simple words: an étudiant (one who is in college) is an élève;
but an élève (one who is in school) might not be an étudiant.
Now, please bear with me because it gets... tricky (well it is probably a mess to be honest):
Pre-college: As I said élève is a broad word, but we mostly use more specific words in this case.
One who is in middle school (collège in France) is a collégien.
One who is in high school (lycée in France) is a lycéen.
Though if you are in front of a mixed crowd not knowing whose who I would say élèves:
Regarde ces élèves... (Look at all these students...)
In-college: It should be étudiant right? Nope, not really...
Because when you think about college, we French think about:
- Faculté (really close to college)
- École d'ingénieur (school of engineering)
- École d'architecture
So depending on what school you are in, it is different.
If one tried to describe oneself as a student, one could say either :
Je suis élève Ingénieur biomédical à [name of school] (I study biomedical engineering) (If you are in an school of engineering OR if you want people to know that you will be an Engineer (status regulated by the French state, hence the capital letter.)
I know that in the previous example, we use a generic terme to describe something specific, but hey not my fault.
The other option is:
Je suis étudiant en ingénierie biomédicale (I am a student in the field of biomedical engineering) (If you are in college but not in an engineering school, and that you will not become an Engineer OR that you don't want to brag.)
Once again, if you only know the student is in college but not what school in particular you would use the generic word étudiant.
Il est étudiant en biologie (he's a biology student)
As you would be generic saying:
Il étudie la biologie (he studies biology)
I hope I make sense to you.
You are right, élève and étudiant both mean "student".
There are instances in which neither would be used, as highlighted in Romain's answer, but in broad generic terms, the difference between the two terms is the level at which the student is studying:
Élève grammatically applies to anyone who is studying anything. This applies to first-graders to someone studying art or music as a hobby.
Étudiant, on the other hand, is reserved for people pursuing higher education degrees. The actual cutoff depends on location and education systems, but as long as someone is doing post-secondary studies, such as university or college in the US, they are an étudiant.
Étudiants are therefore a small subcategory of all the élèves out there, though you would rarely call them élèves.
The difference is that élève generally refers to someone younger than étudiant.
I think the same difference exists in English with the two words pupil and student.
The word "pupil" is often used for youngsters up to high-school age and until the end of their high-school studies as is "élève" in French.
A student is someone who wants to earn a degree in higher education (Licence, Master, Doctorat in French) and has already finished high-school.
In addition to other responses, another difference is that "élève" can be used outside school systems whereas "étudiant" cannot.
You can say someone is an "élève" of a master in a lot of fields (like arts, sciences, crafts ...) even outside a school of any sort.