A proper subsemigroup of a semigroup is maximal if it is not contained in any other proper subsemigroup. A maximal subsemigroup of a finite semigroup has one of a small number of forms, as described in a paper of Graham, Graham, and Rhodes. Determining which of these forms arise in a given finite semigroup is difficult, and no practical mechanism for doing so appears in the literature. We present an algorithm for computing the maximal subsemigroups of a finite semigroup S given knowledge of the Green's structure of S, and the ability to determine maximal subgroups of certain subgroups of S, namely its group H -classes.In the case of a finite semigroup S represented by a generating set X, in many examples, if it is practical to compute the Green's structure of S from X, then it is also practical to find the maximal subsemigroups of S using the algorithm we present. In such examples, the time taken to determine the Green's structure of S is comparable to that taken to find the maximal subsemigroups. The generating set X for S may consist, for example, of transformations, or partial permutations, of a finite set, or of matrices over a semiring. Algorithms for computing the Green's structure of S from X include the Froidure-Pin Algorithm, and an algorithm of the second author based on the Schreier-Sims algorithm for permutation groups. The worst case complexity of these algorithms is polynomial in |S|, which for, say, transformation semigroups is exponential in the number of points on which they act.Certain aspects of the problem of finding maximal subsemigroups reduce to other well-known computational problems, such as finding all maximal cliques in a graph and computing the maximal subgroups in a group.The algorithm presented comprises two parts. One part relates to computing the maximal subsemigroups of a special class of semigroups, known as Rees 0-matrix semigroups. The other part involves a careful analysis of certain graphs associated to the semigroup S, which, roughly speaking, capture the essential information about the action of S on its J -classes. arXiv:1606.05583v4 [math.CO] 6 Jul 2018 are L -related. Green's R-relation is defined dually to Green's L -relation; Green's H -relation is the meet, in the lattice of equivalence relations on S, of L and R. In any semigroup, xJ y if and only if the (2-sided) principal ideals generated by x and y are equal. However, in a finite semigroup J is the join of L and R. We will refer to the equivalence classes as K -classes where K is any of R, L , H , or J , and the K -class of x ∈ S will be denoted by K x . We write K S if it is necessary to explicitly refer to the semigroup on which the relation is defined. We denote the set of K -classes of a semigroup S by S/K .An idempotent is an element x ∈ S such that x 2 = x. We denote the set of idempotents in a semigroup S by E(S). A J -class of a finite semigroup is regular if it contains an idempotent, and a finite semigroup is called regular if each of its J -classes is regular. Containment of principal ideals induces a p...