The study investigates linguistic factors (utterance length) and cognitive factors (scope of mental resources) influencing f0 in spontaneous speech. Specifically, it examines the connection between cognitive demands of language processing and length-dependent f0 raising, providing insights into the cognitive aspect of intonation planning. The experiment assessed the f0 difference between short and long utterances, spoken either in the presence or absence of a concurrent word recall task. The results reveal subtle yet consistent effect of utterance length on sentence intonation across both Estonian and German. Regardless of the language, f0 peaks tend to be higher in longer utterances, indicating effective cross-linguistic pre-planning of intonation for spontaneous speech production. With regard to cognitive factors, f0 peaks were low in Estonian but high in German in the presence of concurrent word recall task. Tentatively, the opposite effects of load on tonal scaling in two languages may have revealed the sensitivity of sentence intonation to different domains of working memory. The results, obtained through an innovative methodology, present novel findings, opening avenues for further exploration and understanding of the cognitive underpinnings of intonation planning.