Owing to its high information density, energy efficiency, and massive parallelism, DNA computing has undergone several advances and made significant contributions to nanotechnology. Notably, arithmetic calculations implemented by multiple logic gates such as adders and subtractors have received much attention because of their well-established logic algorithms and feasibility of experimental implementation. Although small molecules have been used to implement these computations, a DNA tile-based calculator has been rarely addressed owing to complexity of rule design and experimental challenges for direct verification. Here, we construct a DNA-based calculator with three types of building blocks (propagator, connector, and solution tiles) to perform addition and subtraction operations through algorithmic self-assembly. An atomic force microscope is used to verify the solutions. Our method provides a potential platform for the construction of various types of DNA algorithmic crystals (such as flip-flops, encoders, and multiplexers) by embedding multiple logic gate operations in the DNA base sequences.