Ga2O3 and (AlxGa1−x)2O3 alloys are promising materials for solar-blind UV photodetectors and high-power transistors. Basic key parameters in the device design, such as band gap variation with alloy composition and band offset between Ga2O3 and (AlxGa1−x)2O3, are yet to be established. Using density functional theory with the HSE hybrid functional, we compute formation enthalpies, band gaps, and band edge positions of (AlxGa1−x)2O3 alloys in the monoclinic (β) and corundum (α) phases. We find the formation enthlapies of (AlxGa1−x)2O3 alloys are significantly lower than of (InxGa1−x)2O3, and that (AlxGa1−x)2O3 with x=0.5 can be considered as an ordered compound AlGaO3 in the monoclinic phase, with Al occupying the octahedral sites and Ga occupying the tetrahedral sites. The band gaps of the alloys range from 4.69 to 7.03 eV for β-(AlxGa1−x)2O3 and from 5.26 to 8.56 eV for α-(AlxGa1−x)2O3. Most of the band offset of the (AlxGa1−x)2O3 alloy arises from the discontinuity in the conduction band. Our results are used to explain the available experimental data, and consequences for designing modulation-doped field effect transistors (MODFETs) based on (AlxGa1−x)2O3/Ga2O3 are discussed.