Zhang Cang 張蒼, also written 張倉 (d. 152 BCE), was a high minister during the early Former Han period 前漢 (206 BC-8 CE).
He hailed from Yangwu 陽武 (modern Yuanyang 原陽, Henan) and served as censor (yushi 御史) under the Qin dynasty 秦 (221-206 BCE). As a such, he was expert in law codes and mathematics and would later be the first to develop a new calendar for the Han dynasty. When the first rebellion against the Qin dynasty broke out, he joined the camp of Liu Bang 劉邦 (r. 206-195 BCE), the eventual founder of the Han dynasty. Because of some offence, he was to be executed, but Wang Ling 王陵 rescued him.
He followed Liu Bang in his conquest of the Qin capital Xianyang 咸陽 (modern Xianyang, Shaanxi) and was a commander under Han Xin 韓信 during the war against the hegemonial war Xiang Yu 項羽. Zhang Cang was appointed governor (taishou 太守) of the commandery of Changshan 常山 and counsellor to the kings of Dai 代 and Zhao 趙. He participated in the campaign against Zang Tu 臧荼, king of Yan 燕.
In 201 he was given the title of Marquis of Beiping 北平侯. After the execution of Han Xin, he was for a long time counsellor to the Prince of Huainan 淮南. In 180 he was made Censor-in-chief (yushi dafu 御史大夫) by Emperor Wen 漢文帝 (r. 180-157), in 176 Counsellor-in-chief (chengxiang), as successor of Guan Ying 灌嬰.
He died in 152 and was given the posthumous title of Marquis Wen 文侯. The imperial bibliography Yiwen zhi 藝文志 in the official dynastic history Hanshu 漢書 credits him with the authorship of a 16 juan "scrolls" long book on mathematics, Duzhong suanshu 杜忠算術, which might have been the basic form of the famous Jiuzhang suanshu 九章算術.