The US pop star made the contribution via a Go Fund Me page raising money for Vitoria Mario, which states that she may not be able to take up her place at the University of Warwick.
According to the fundraising page, Ms Mario moved to Britain from Portugal four years ago and is not eligible for maintenance loans or grant.
Ms Mario, who lives in Tottenham, north London, said her father has died and her mother lives in Portugal.
“Moving away from her was a challenge but it was a sacrifice worth being made in my family’s eyes,” she added.
Alongside the donation for £23,373, Swift wrote: “Vitoria, I came across your story online and am so inspired by your drive and dedication to turning your dreams into reality.
“I want to gift you the rest of your goal amount. Good luck with everything you do! Love, Taylor.”
Ms Mario estimated she would need £24,000 for accommodation, £3,000 for equipment and £13,000 for general living costs including food, transport, gas and electricity.
“Though my story is not unique, my dream of becoming a mathematician is not only a chance at social mobility for my family and I, but to inspire people who have been in similar positions to aspire to be the best version of themselves and strive for their dreams despite gender/racial inequality, immigration issues and financial barriers,” the 18-year-old wrote.
She added that she has always been “studious” and was unable to speak English when she moved to the UK in 2016.
She reached her fundraising target following Swift’s donation.