He was born as Karel Lončar in Selo near Lukovica in Upper Carniola. After graduating from the State Gymnasium in Ljubljana, he studied history at the Charles University in Prague, graduating in 1904. In Prague, he joined the circle of young Slovene left-wing intellectuals that became influenced by the political and social thought of Tomáš Garrigue Masaryk, which included figures such as Anton Dermota and Josip Ferfolja.
After returning to the Slovene Lands, he taught history at Ljubljana's First Gymnasium, briefly serving as its director. He later served as the director of the National Museum of Slovenia, and, from 1920, as head of the Slovene Society publishing house (Slovenska matica).
Before World War One, he joined the Yugoslav Social Democratic Party, where he belonged to its right wing led by Albin Prepeluh. He left the party after it merged with the so-called Centrists in 1921, who supported Yugoslav centralism. In 1924, Lončar was among the co-founders of the Slovenian Labour Agrarian Republican Party, which in 1927 merged with the Independent Agrarian Party into the Slovenian Peasant Party, a Slovenian counterpart to the Croatian Peasant Party, with which it maintained strong ties.
After the establishment of the royal dictatorship of King Alexander I of Yugoslavia, Lončar withdrew from politics, dedicating himself to his scholarly and editorial work.
He died in Ljubljana and was buried in the Žale cemetery.
- Politično življenje Slovencev (Political Life of Slovenes, 1906)
- Dr. Janez Bleiweis in njegova doba (Dr. Janez Bleiweis and His Epoch, 1910)
- Slovenci: načrt slovenske socialne zgodovine (Slovenes: A Sketch of Slovene Social History, 1911)
- Janko Kersnik, njega delo in doba (Janko Kersnik: His Work and Epoch, 1914)
- Politika in zgodovina : nekoliko odgovorov na dnevna vprašanja (Politics and History: Some Answers to Current Questions, 1923)
- Kako je nastalo današnje delavstvo in njegovo gibanje (The Genesis of the Modern Working Class and Its Political Movement, 1930)
- Dragotin Dežman in slovenstvo (Dragotin Dežman and the Slovene Identity, 1930)
- The Slovenes: A Social History from the Earliest Times to 1910 (1940)