The defining difference between ragtime and jazz comes down to one word: improvisation.
Ragtime (c. 1895–1919) is fully composed, notated music. Its signature syncopated rhythms—"ragged time"—are meticulously written out, leaving no room for spontaneous invention. Scott Joplin's piano rags are masterpieces of structure, but every performance replicates the score.
Jazz, emerging in the 1910s–20s from the same African-American musical soil, centers on real-time melodic creation. Whether collective improvisation in early New Orleans styles or solo flights in later eras, jazz musicians compose in the moment. Ragtime contributed syncopation, form, and pianistic vocabulary to early jazz, but without improvisation, it remains a distinct genre—a precursor, not the thing itself.
Think of it this way: Ragtime is a scripted play; jazz is improv theater. Both entertain, but only one rewrites itself every night.