The thesis discusses the theory and practice of calculating the orientation of an object. For the realization of the task I have used a smartphone. The data measured by the phone’s sensors are streamed continuously to a Matlab application, which is calculating and visualizing the current orientation based on the streamed data. The thesis includes the short theoretical introduction of the term orientation. The functioning of sensors, which can be used to calculate orientation of an object is also detailed in the thesis, and it is also mentioned whether these sensors are available in common smartphones. One of the most important part is the discussion of the used sensors’ (accelerometer, magnetometer and gyroscope) data’s usage: it means the calibration of the raw sensor data and also the calculations with the already calibrated sensor data. The calculation of the orientation with each sensor alone is detailed separately. Based on the results of these calculations the thesis presents the fusion of different sensors, detailing its motivation, realization and also its results. The graphical user interface, which is also part of the Matlab application is also presented, where the user can watch the visualization of the current orientation of the phone or check the real-time raw sensor data (based on the ever constantly streamed sensor data). I close the thesis with a short summary of the created application and its results, alongside with the future development possibilities.