The growing interest in the use of powder X-ray diffractometry for materials’ characterization has led to the introduction of relevant concepts (e.g. microstructure, strain, anisotropy, texture) to undergraduate teaching in engineering and science. In this concern, the study of polycrystalline materials underlays the use of appropriate software: free, licensed, proprietary, or commercial to assist research on structure determination, structure refinement, and microstructure characterization. Today with the easy access to personal computers, routines for powder diffractometry also becomes feasible to use for non-specialist. Therefore, it would be relevant that students with computing knowledge may decide to improve routines on such three tasks incorporating their own computational approaches. In this study, we show the development of a ready-to-use and open source program written in GNU-Octave (v4.2.1) focused on X-ray diffraction line-profile analysis. The programing language platform was chosen mainly because of two reasons: (1) there is no requirement for commercial licenses, meaning that both programing language and routines can be downloaded online, facilitating collaborative efforts between students, instructors, and developers, and (2) easy re-coding of evaluation strategies is always allowed through fast implementation of modules into the code. The code, IndexCub, features routines for background subtraction, whole profile smoothing, and Kα2 radiation removal, location of diffraction peaks positions, indexing for cubic specimens, multi peak separation of individual peaks, and evaluation of full-width at half-maximum and integral breadth values. Microstructure properties are characterized through the use of integral breadth methods (e.g. Williamson–Hall) and Fourier analysis (e.g. Warren–Averbach), and the anisotropy effects are incorporated introducing calculations of contrast factors. In terms of diffraction domain sizes, size distribution, and the lattice microstrain, the analysis of the microstructure is discussed along with examples for polycrystalline coarse-grained materials (NaCl), epitaxial film (Si), and thin-films (Au) specimens. The code facilitates the understanding of microstructure analysis by using theoretical approaches well established and in state-steady level.