Brahmagupta became the head of the astronomical observatory at Ujjain, which was the foremost mathematical centre of ancient India at this time. Brahmagupta wrote 2 important works on mathematics and astronomy. In particular he wrote Brahmasphutasiddhanta (The Opening of the Universe) in 628.

The Brahmasphutasiddhanta contains 25 chapters but the first 10 of these chapters seem to form what many historians believe was a first version of Brahmagupta's work and some manuscripts exist which contain only these chapters. These ten chapters are arranged in topics which are typical of Indian mathematical astronomy texts of the period. The topics covered are: mean longitudes of the planets, true longitudes of the planets, the three problems of diurnal rotation, lunar eclipses, solar eclipses, risings and settings, the moon's crescent, the moon's shadow, conjunctions of the planets with each other, and conjunctions of the planets with the fixed stars.

The remaining 15 chapters seem to form a second work which is major addendum to the original treatise. The chapters are: examination of previous treatises on astronomy, on mathematics, additions to various chapters, on algebra, on the gnomon, on meters, on the sphere, on instruments, summary of contents, and versified tables.

Brahmagupta's understanding of the number systems went far beyond that of others of the period. In the Brahmasphutasiddhanta he defined zero as the result of subtracting a number from itself. He also extended arithmetic to negative numbers.

Another arithmetical result he presented is his algorithm for computing square roots. It is now known that it is equivalent to the Newton-Raphson iterative formula. He developed some algebraic notation and presents methods to solve quadratic equations. Brahmagupta used the method of continued fractions to find the integral solutions of linear indeterminate equations. He also solved some quadratic indeterminate equations. Rules for summing series are also given. Brahmagupta gives the sum of the squares and cubes of the first n natural numbers. He also gave remarkable formulas for the area of a cyclic quadrilateral and for the lengths of the diagonals in terms of the sides.