Xinfa suanshu 新法算書 "The book of calculations with new methods" is a book on astronomical calculations written during the late Ming period 明 (1368-1644) by a team under the supervision of Xu Guangqi 徐光啟 (1562-1633), courtesy name Zixian 子先, from Xujiahui 徐家匯 (today part of Shanghai). He became a jinshi in 1604. In 1632, he was appointed Minister of Rites (libu shangshu 禮部尚書) and Grand Secretary of the East Pavilion (Dongge daxueshi 東閣大學士), later also serving as Grand Secretary of the Pavilion of the Profundity of Literature (Wenyuange daxueshi 文淵閣大學士). His research spanned multiple fields, with particular emphasis on agriculture (notably, the encyclopaedia Nongzheng quanshu 農政全書) and astronomy.
After Matteo Ricci (1552-1610; Chinese name Li Madou 利瑪竇) arrived in Beijing, Xu studied Western science and technology under him and introduced these ideas to China. He oversaw the revision of the calendar by the Chongzhen Calendar (Chongzhen lishu 崇禎曆書), and translated Euclid's (fl. 300 BCE) "Elements" as Jihe yuanben 幾何原本.
During the Chenghua reign-period 成化 (1465-1487), inconsistencies arose between the official calendar and astronomical observations. By 1629, Xu Guangqi was entrusted with revising the calendar. He collaborated with Li Zhizao 李之藻 (1571-1630) and the Jesuit missionaries Niccolò Longobardo (1559-1655; Long Huamin 龍華民) and Johannes Schreck (1576-1630; Deng Yuhan 鄧玉函) to produce several dozen volumes on calendrical calculations. Xu passed away before the project was completed, and Li Tianjing 李天經 (1579-1659) continued the work, finalising the calendrical system and instruments.
The Xinfa suanshu, totalling 100 juan, is divided into ten sections, beginning with a preface on the necessity of calendar reform, followed by official memorials, observational analyses, and debates on calendrical methods. The first five sections cover foundational principles: The principles of calendrical science (Fayuan 法原), numerical methods (Fashu 法數), mathematical calculations (Fasuan 法算), astronomical instruments (Faqi 法器), and comprehensive studies (Huitong 會通). The latter sections focus on specific celestial phenomena and calculations, like the solar motion (richan 日躔), the fixed stars (hengxing 恒星), the lunar distance from the earth (yueli 月離), solar and lunar conjunctions (riyue jiaohui 日月交會), the movements of the Five Planets (wuxing wei 五星緯) and planetary conjunctions (wuxing jiaohui 五星交會).
At the end of the book, two additional works by the German Jesuit missionary Johann Adam Schall von Bell (1591-1666; Tang Ruowang 湯若望) are included: The "Western transmission of calendrical science" (Fa xi zhuan 法西傳) and "Comparison of the new and old methods" (Fabiao yi 法表異). These were written after Schall pledged allegiance to the Qing dynasty 清 (1644-1911).
The book was printed several times in the early Qing period and is included in the imperial series Siku quanshu 四庫全書.