Recall the classical Riemann-Roch theorem for curves: Given a smooth projective complex curve and two holomorphic vector bundles E, F on it, the Euler can be computed in terms of the ranks and the degrees of the vector bundles. Remarkably, there are a number of similarly looking formulas in algebra. The simplest example is the Ringel formula in the theory of quivers. It expresses the Euler form of two finite-dimensional representations of a quiver algebra in terms of a certain pairing of their dimension vectors. The existence of Riemann-Roch type formulas in these two settings is a consequence of a deeper similarity in the structure of the corresponding derived categories - those of sheaves on curves and of modules over quiver algebras. The thesis is devoted to a version of the Riemann-Roch formula for abstract derived categories. By the latter we understand the derived categories of differential graded (DG) categories. More specifically, we work with the categories of perfect modules over DG algebras. These are a simultaneous generalization of the derived categories of modules over associative algebras and the derived categories of schemes. Given an arbitrary DG algebra A, satisfying a certain finiteness condition, we define and explicitly describe a canonical pairing on its Hochschild homology. Then we give an explicit formula for the Euler character of an arbitrary perfect A-module, the character is an element of the Hochschild homology of A. In this setting, our noncommutative Riemann-Roch formula expresses the Euler characteristic of the Hom-complex between any two perfect A-modules in terms of the pairing of their Euler characters. One of the main applications of our results is a theorem that the aforementioned pairing on the Hochschild homology is non-degenerate when the DG algebra satisfies a smoothness condition. This theorem implies a special case of the well-known noncommutative Hodge-to-de Rham degeneration conjecture. Another application is related to mathematical physics: We explicitly construct an open-closed topological field theory from an arbitrary Frobenius algebra and then, following ideas of physicists, interpret the noncommutative Riemann-Roch formula as a special case of the so-called topological Cardy condition.