g | x | w | all
Bytes Lang Time Link
060AWK250317T171134Zxrs
012Pyth250313T210400ZGlory2Uk
034jq Rr221022T000005Zpmf
010Uiua241008T004317Znoodle p
011Uiua231019T181114Zchunes
006Thunno 2230720T090334ZThe Thon
028Dyalog APL v18230116T024442ZAndriy M
042R221101T094033ZDominic
091brainfuck230115T054926Zl4m2
029Arturo230115T025052Zchunes
073C++ gcc221117T173916Zhuanglx
026Julia 1.0221102T125115Zamelies
2624><> Fish221104T144643Zmousetai
014K ngn/k221104T141831Zoeuf
048Mathematica221021T230643Zhakr14
036Knight v2221103T071925ZSampersa
015Gaia221101T134940ZCliff
059R v4.2.0221024T174803Zacvill
043Haskell221101T132303ZLaikoni
nanBits221026T132215ZThe Thon
019J221025T155204Zsouth
030x86‑64 assembly machine code221022T162853ZKai Burg
016Pip221024T185548ZBaby_Boy
054PowerShell221024T162615ZTwoScoop
064C# .Net 6221024T123436ZMMM
072JavaScript V8221023T200014ZKnight I
077Gema221023T203246Zmanatwor
132Java OpenJDK 8221023T192205ZKnight I
126brainfuck221022T031513ZGotCubes
058Excel ms365221022T091742ZJvdV
007Pushy221022T141926ZFlipTack
009Vyxal221021T181810Zmath sca
015BQN221022T093501ZDominic
014Brachylog221022T082436ZFatalize
714Nibbles221022T064443ZDominic
020Pip221022T013528ZAiden Ch
027Raku221022T001926ZSean
025Retina 0.8.2221022T001214ZNeil
008Charcoal221022T000147ZNeil
047Wren221021T220603Zchunes
010MATL221021T183725ZLuis Men
065Clojure221021T212018ZBob Jarv
018ARM Thumb machine code221021T204113ZEasyasPi
046C gcc221021T204811ZDigital
nanFig221021T200426Zsouth
008Jelly221021T202108ZJonathan
041Zsh221021T201317ZGammaFun
008Japt221021T201241ZKamil Dr
nan221021T201145Zbigyihsu
043Python 3221021T180658Z97.100.9
00605AB1E221021T194414ZKevin Cr
076simply221021T192238ZIsmael M
024Factor + math.unicode221021T182128Zchunes
032Ruby221021T180333ZJordan
051JavaScript Node.js221021T182639ZArnauld
074Python221021T175804ZThe Thon
010Thon Symbols s flag221021T175342ZThe Thon

AWK, 60 bytes

@load "ordchr";{for(;i++<NF;)s+=ord($i)-97;$0=chr(s%26+97)}1

Attempt This Online!

@load "ordchr";   # character lib
{for(;i++<NF;)    # for each char
s+=ord($i)-97;    # convert to num from ASCII
$0=chr(s%26+97)}1 # back to ASCII and print

Pyth, 12 bytes

@G%sm+7CdQ26

Try it online!

Test cases

This uses the same algorithm as in other answers (add 7 to each charcode, sum, mod by 26 and subset the alphabet with the resulting index).

jq -Rr, 37 34 bytes

[explode[]-97]|[add%26+97]|implode

Try it online!

Uiua, 10 bytes

+◿26/+⤚-@a

Try it: Uiua pad

Uiua, 11 bytes

+@a◿26/+-@a

Try it!

+@a◿26/+-@a
        -@a  # convert string to code points
      /+     # sum
   ◿26       # modulo 26
+@a          # add the letter a

Thunno 2, 6 bytes

Ä⁻S⁺ÄL

Try it online!

Explanation

Ä⁻S⁺ÄL  # Implicit input
Ä       # 1-based index in alphabet
 ⁻      # Decrement to make 0-indexed
  S     # Sum the resulting list
   ⁺    # Increment for 1-indexing
    Ä   # 1-based convert to letter
     L  # Lowercase it
        # Implicit output

Dyalog APL v18, 28 bytes*

{a[1+26|+/1-⍨(a←¯1∘⎕C⎕A)⍳⍵]}

Assuming that indices start from one (⎕IO←1).

________________
*: APL can be written in its own legacy charset (defined by ⎕AV) instead of Unicode; therefore an APL program that only uses ASCII characters and APL symbols can be scored as 1 char = 1 byte.

R, 44 43 42 bytes

letters[sum(utf8ToInt(scan(,""))+7)%%26+1]

Try it online!

(or 38 bytes as a function in R ≥ 4.1).

brainfuck, 91 bytes

++[++[->+>+<<]>>[--<<+>>]<],[[-[->+<]>]>>>>>>>,]+[<<<<<<<<<<<<<<<<<<<<<<<<<<+<[-----.[>]]>]

Try it online!

++[++[->+>+<<]>>[--<<+>>]<]    Init memory with 1,2,3,...,127
,[[-[->+<]>]>>>>>>>,]          Reading each byte, move right that many steps
+[<<<<<<<<<<<<<<<<<<<<<<<<<<+< Go left 26 and check if empty
[-----.[>]]>]                  If not empty, give shift, output and halt

Arturo, 29 bytes

$[a][+97(sum map a=>[+7])%26]

Try it

C++ (gcc), 76 73 bytes

-3 thanks to @ceilingcat

I think this is as much golf as you can get without using a completely different method. Other people will probably prove me wrong the moment I hit "Post." have in fact proven me wrong.

#import<ios>
int f(char*s){int t=0;for(;*s;t+=*s++-97);putchar(t%26+97);}

Try it online!

Ungolfed

We used #import<ios> so we can putchar().

int f(char* s) {
    int t = 0;                      // Running total
    for(;*s != 0;t += *s++ - 97);   // Loop through string until we get to null byte, add to running total
    putchar(t % 26 + 97);           // Add 97 to final result and print
}

Julia 1.0, 36 26 bytes

!s=sum([s...].-'a')%26+'a'

Try it online!

-10 MarcMush

><> (Fish), 26 24 bytes

0i:0(?v+7+2d*%!
o+"a"~<;

Animated Version

Explanation:

0

Push 0, the starting value

i:0(?v

Check if the input is negative, if so go down.

+7+2d*%

Add 7+the input to the accumulator, then mod 26

!

Skip the 0 the second time, since the accumulator is already set

~"a"+o;

(Reversed in the program) Print "a" + the accumulator.

K (ngn/k), 16 14 bytes

`c$97+26!+/97!

Try it online!

-2 bytes thanks to coltim!

Explanation:

`c$97+26!+/97!  Main function. Takes implicit input
           97!  Modulo by 97 to each character in the string
                to convert them into the 0..25 system
                (In K, every character in a string is also an ASCII charcode)
         +/     Sum
      26!       Modulo by 26
   97+          + 97 to each of them to convert them back to ASCII charcode
`c$             And convert them back to characters

Mathematica, 60 48 bytes

FromLetterNumber[Tr[LetterNumber@#-1]~Mod~26+1]& 

View it on Wolfram Cloud!

-12 bytes thanks to JSorngard!

Knight (v2), 36 bytes

;=sP;=i@O;Ws;=i+~-97iAs=s]sA+97%i 26

Try it online!

I feel like you can golf better but i tried for awhile and gave up

Gaia, 16 15 bytes

⟨c97%⟩¦Σ26%97+c

Try it online!

Pretty standard implementation of what the challenge asks.

I was able to save a byte thanks to the golfing advice given by
Dominic van Essen!

Explained

⟨c97%⟩¦Σ26%97+c
⟨    ⟩¦           # To each letter in the input {
 c97%            #  modulo the character code by 96
                 #  }
       Σ26%      # Get the sum of that list and modulo 26
          97+c   # and add 97 to turn it back into an ascii letter

R v4.2.0, 63 59

-4 thanks to Dominic van Essen

\(x,l=letters)l[(sum(match(el(strsplit(x,"")),l)-1)%%26)+1]

The input string x is parsed as characters, and match is used to retrieve the index of each character in the letters builtin, minus one to convert from 1-based to 0-based.

Haskell, 43 bytes

f s=['a'..]!!mod(sum[fromEnum c-97|c<-s])26

Try it online!

Same-length alternative:

f s=['a'..]!!mod(sum$do c<-s;1<$['b'..c])26

Try it online!

Bits, 130 bits = 16.25 bytes

1110000111000001110001011111110111010100000001100111110101011100011000000110001011001101101110000000110100111001111101010111111100

This was very painful.

Explanation

11100001   // Get a string input
1100000    // Push 0 to the stack [this will be our running sum]
11100010   // For each character in the input string:
111111101  //   Get ord(c)
1101010    //   Add [to the running sum]
000000     //   Separator so the numbers don't get joined together
1100111    //   Push 7
1101010    //   Add [to the running sum]
11100011   // ENDFOR
000000     // Separator so the numbers don't get joined together
1100010    // Push 2
1100110    // Push 6 [this gets joined into 26]
1101110    // Mod our running sum by 26
000000     // Separator so the numbers don't get joined together
1101001    // Push 9
1100111    // Push 7 [this gets joined into 97]
1101010    // Add [to the result of the mod]
111111100  // Get chr(x)
           // [implicit output of the item on the top of the stack]

Output

output

J, 19 bytes

(26|+/)&.(_97+3&u:)

Attempt This Online!

(26|+/)&.(_97+3&u:)
       &.            NB. F&.G y applies G⁻¹(F(G x)) to y, rank is decided by G
         (_97+3&u:)  NB. fork converting str to char codes and subtracting 97 from each
(26|+/)              NB. fork that sums the arg and mods the result by 26
                     NB. +/ can be used because u: operates on y as a whole
                     NB. The inverse of G in this case would be to add 97 to
                     NB. the result of F and then convert char code to str

x86‑64 assembly machine code, 30 B

input

code listing

 1                 alphabet_checksum:
 2 0000 6A61        push 'a'                    ; push(97)
 3 0002 58          pop rax                     ; pop(rax)
 4 0003 F7E7        mul edi                     ; edx○eax ≔ eax × edi
 5                  
 6 0005 F7D8        neg eax                     ; eax ≔ −eax; CF ≔ eax ≠ 0
 7 0007 7310        jnc .adjust                 ; if ¬CF then goto adjust
 8                 .sum:
 9 0009 0FB64C3EFF  movzx ecx, byte [rsi+rdi-1] ; ecx ≔ (rsi + rdi − 1)↑
10 000E 01C8        add eax, ecx                ; eax ≔ eax + ecx
11 0010 FFCF        dec edi                     ; edi ≔ edi − 1; ZF ≔ edi = 0
12 0012 75F5        jnz .sum                    ; if ¬ZF then goto sum
13                  
14 0014 6A1A        push 26                     ; push(26)
15 0016 5F          pop rdi                     ; pop(rdi)
16 0017 F7F7        div edi                     ; edx ≔ edx○eax mod edi
17                 .adjust:
18 0019 92          xchg eax, edx               ; eax ≔ edx
19 001A 83C061      add eax, 'a'                ; eax ≔ eax + 97
20 001D C3          ret

output

limitations

Pip, 16 bytes

zPK$+(A*a-97)%26

Try It Online!

PowerShell, 54 bytes

$s.tochararray()|%{$r+=([char]$_)-97};[char]($r%26+97)

Try it online!

C# (.Net 6), 64 bytes

int i=0,j=0;for(;i<a.Length;)j+=a[i++]-97;return(char)(97+j%26);

Try it here

JavaScript (V8), 72 bytes

([...s])=>String.fromCharCode(s.map(c=>t+=c.charCodeAt()+7,t=0)|t%26+97)

Try it online!

Gema, 77 characters

?=@set{s;@add{${s;};@add{@char-int{?};7}}}
\Z=@int-char{@add{@mod{$s;26};97}}

(Yepp. Arithmetic operations are a pain in Gema.)

Sample run:

bash-5.1$ echo -n helloworld | gema '?=@set{s;@add{${s;};@add{@char-int{?};7}}};\Z=@int-char{@add{@mod{$s;26};97}}'
k

Try it online!

Java (OpenJDK 8), 132 bytes

interface T{static void main(String[]a){int i=a[0].length(),s=0;for(;i-->0;s+=a[0].charAt(i)+7);System.out.print((char)(97+s%26));}}

Try it online!

brainfuck, 142 126 bytes

,[>++++++++[-<------------>]<-[->>>>+<<<<],]>>>>>+++++[->+++++<]>+<<[>+>->+<[>]>[<+>-]<<[<]>-]>>>>++++++++[-<++++++++++++>]<+.

Try it online!

Edit: -16 bytes due to common sense. Remembered I didn't have to load 97 into its own cell before adding/subtracting.

My first time golfing in brainfuck! Here's the ungolfed code for your viewing displeasure:

,					GET EACH CHARACTER IN THE INPUT
[
	>++++++++[-<------------>]<-	SUBTRACT 97 (8 TIMES 12 PLUS 1) FROM CELL 0
	[->>>>+<<<<]			ADD CELL 0 TO CELL 4
	, 				INPUT TO CELL 0
]
>>>>					GO TO CELL 4
>+++++[->+++++<]>+<<			LOAD 26 (5 TIMES 5 PLUS 1) INTO CELL 6
[>+>->+<[>]>[<+>-]<<[<]>-]		TAKE CELL 4 MOD CELL 6
>>>					GO TO RESULT IN CELL 7
>++++++++[-<++++++++++++>]<+		ADD 97 (8 TIMES 12 PLUS 1) TO CELL 7
.					DISPLAY

Excel (ms365), 59, 58 bytes

-1 Thanks to @TheThonnu

=CHAR(MOD(SUM(CODE(MID(A1,SEQUENCE(LEN(A1)),1))+7),26)+97)

enter image description here

Pushy, 7 bytes

L7*SvOq

Try it online!

         The input is implicitly converted into bytecodes on the stack.
L7*      Push the length of the input, times 7.
   S     Push the sum of the stack.
    vO   Send this to the 'output stack'.
      q  Index into the ASCII lowercase alphabet (mod 26) and print the result.

Pushing 7 times the length comes from the fact that a has bytecode 97, and \$ -97 \equiv 7 \ (\text{mod} \, 3) \$. So it's equivalent to subtracting 97 from each bytecode.

Vyxal, 9 bytes

øA‹∑₄%›øA

Try it Online!

øA‹∑₄%›øA
øA          Letter to number (1-indexed)
  ‹         Decrement each value in list
   ∑        Sum it up
    ₄%›     Modulo by 26 and increment
       øA   Number to letter

BQN, 15 bytes

'a'+26|·+´-⟜'a'

Try it at BQN REPL

'a'+26|·+´-⟜'a'
          -⟜'a'     # subtract 'a' from each letter of input
        +´          # sum
       ·            # (no-op to preserve train syntax)
    26|             # modulo 26
'a'+                # add 'a'

Brachylog, 14 bytes

ạ+₇ᵐ+%₂₆+₉₇g~ạ

Try it online!

Explanation

ạ                 String to char codes
 +₇ᵐ              Add 7 to each code (a <-> 97 becomes 104 = 0 (mod 26))
    +             Sum
     %₂₆          Mod 26
        +₉₇       Add 97
           g      Wrap into a list
            ~ạ    Char code to string

Nibbles, 7 bytes (14 nibbles)

+%+.$-$;'a'26 
   .            # map over 
    $           # the input:
     -          #   subtract
        'a'     #   the letter 'a'
       ;        #   (and save it)
      $         #   from each letter
                #   (which gives its 0-based index)
  +             # now sum this list
 %         26   # apply modulo-26
+               # and add back the saved letter 'a'

enter image description here

Pip, 20 bytes

C(($+(7+A*a))%26+97)

Try It Online!

Probably could be shorter, I feel like there are just way too many parentheses.

Raku, 27 bytes

{chr sum(.ords X-97)%26+97}

Try it online!

Retina 0.8.2, 25 bytes

0T1>`l`L
+T`l__L`zlL_`^..

Try it online! Link includes test cases. Explanation:

0T1>`l`L

Uppercase all letters after the first.

+T`l__L`zlL_`^..

While there are at least two letters, repeatedly rotate the first letter backwards and the second letter forwards in the alphabet, however the first letter rotates back from a to z while the second letter drops off when it passes Z, allowing subsequent letters to be processed.

The l and L in the patters expand to the lowercase and uppercase alphabet respectively. The _ in the source pattern is just a placeholder to allow the use of l and L in the destination pattern, while in the destination pattern it indicates that the character is to be deleted.

Charcoal, 8 bytes

§βΣES⌕βι

Try it online! Link is to verbose version of code. Explanation:

    S       Input string
   E        Map over characters
       ι    Current character
     ⌕      Find index in
      β     Predefined variable lowercase alphabet
  Σ         Take the sum
§           Cyclically indexed into
 β          Predefined variable lowercase alphabet
            Implicitly print

Wren, 47 bytes

Fn.new{|s|(s.bytes.reduce{|x,y|x+7+y}+7)%26+97}

Try it online!

MATL, 10 bytes

2Y2j97-sQ)

Try it online! Or verify all test cases.

Explanation

2Y2j97-sQ)
2Y2         % Push predefined literal: string 'abc···xyz'
            % STACK: 'abc···xyz'
   j        % Take input as a string
            % STACK: 'abc···xyz', 'helloworld'
    97-     % Push 97 (ASCII code of 'a'), and subtract element-wise
            % STACK: 'abc···xyz', [7 4 11 11 14 22 14 17 11 3]
       s    % Sum
            % STACK: 'abc···xyz', 114
        Q)  % Add 1, and use as index (1-based, modular). Implicit display
            % STACK: 'k'

Clojure, 65 bytes

(defn a[s](char(+(mod(apply + (map #(- % 97)(map int s)))26)97)))

Try it online!

Ungolfed:

(defn alpha-checksum [s]
  (char (+ (mod (apply + (map #(- % 97) (map int s))) 26) 97)))

ARM Thumb machine code, 18 bytes

61 20 04 c9 61 3a 10 44 fb d5 1a 38 fd d2 7b 30
70 47

Assembler source:

    .syntax unified
    .arch armv7-a
    .thumb
    .globl alpha_checksum
    .thumb_func
    // Input: r1: null terminated UTF-32LE string
    // Output: r0
    // Clobbers: r0-r2
alpha_checksum:
    // Initial accumulator. Start at 'a' to cancel the checksum
    // loop adding '\0' - 'a' when the null terminator is reached.
    movs   r0, #'a'
.Lloop:
    // Load character, increment pointer
    ldmia  r1!, {r2}
    // Subtract 'a' to convert to a number, set flags
    // In the case of the null terminator, this will result in
    // -'a', which ends the loop condition below.
    subs   r2, #'a'
    // Add to the checksum, without setting the flags
    add    r0, r2
    // Loop if the subs didn't return negative,
    // which happens only with the null terminator.
    bpl    .Lloop
.Lend:
    // Calculate (checksum % 26) - 26 using a naive subtraction loop
.Lmodulo:
    // Subtract 26
    subs   r0, #26
    // Loop while it was >= 26
    bhs    .Lmodulo
    // Add 26 to correct the modulo, and 'a' to convert to ASCII.
    adds   r0, #'a' + 26
    // Return
    bx     lr

This can be called from C using a dummy parameter to place ptr in r1.

ptr is expected to be a pointer to a null terminated UTF-32LE string.

char32_t alpha_checksum(int dummy, const char32_t *ptr);

C (gcc), 46

t;f(char*s){for(t=0;*s;)t+=*s++-97;t=t%26+97;}

Try it online!

Fig, \$10\log_{256}(96)\approx\$ 8.231 bytes

ica%26S+7C

Using Arnauld's logic. Accepts a list of characters

Try it online!

ica%26S+7C
         C # str -> char code, vectorises
       +7  # add 7 to each item
      S    # sum
   %26     # sum % 26
 ca        # lowercase alphabet
i          # index intro ca using result

Alternate \$13\log_{256}(96)\approx\$ 10.701 bytes

ica%26SM'lxca

Try it online!

ica%26SM'lxca
           ca  # lowercase alphabet
          x    # input
       M'l     # map find over x where we look for each char in ca, returns index
      S        # sum
   %26         # sum % 26
ica            # index into ca using the result

Jelly, 8 bytes

O+7S‘ịØa

A monadic Link that accepts a list of characters and yields a character.

Try it online! Or see the test-suite.

How?

O+7S‘ịØa - Link: list of characters, Message
O        - ordinals (Message)
 +7      - add seven (vectorises)
   S     - sum
    ‘    - increment
      Øa - "abc...xyz"
     ị   - index into (1-based and modular)

Zsh, 41 bytes

a=(+##${(s..)^1}+7)
<<<${(#)$((a%26+97))}

Try it online!

(s..)plit, ^ RC-style expand as +##${1[1]}+7 +##${1[2]}+7 .... Then (#) evaluate the expression as character codes.

Japt, 8 bytes

;x!aC gC

Try it

Input as an array of characters.

Explanation:

;x!aC gC
;        # C = "abcdefghijklmnopqrstuvwxyz"
 x       # Compute the following for each character, then sum the results:
  !aC    #  Find its index in C
      gC # Get the character at that index in C (wrapping)

You can also rearrange things like this for a different 8 byte solution which works almost exactly the same way.

Go, 68 bytes

func(s string)(t int){for _,r:=range s{t+=int(r)-97}
return t%26+97}

Attempt This Online!

Python 3, 43 bytes

-1 byte from @Arnauld

lambda s:chr(sum(ord(c)+7for c in s)%26+97)

Try it online!

05AB1E, 6 bytes

ADIkOè

Input as a list of characters.

Try it online or verify all test cases.

Explanation:

A       # Push the lowercase alphabet
 D      # Duplicate it
  I     # Push the input-list
   k    # Get the index of each character in the (top) alphabet
    O   # Sum these together
     è  # (Modular 0-based) index it into the alphabet
        # (after which this character is output as result)

simply, 76 bytes

It is a pretty long one...

Creates an anonymous function that outputs the expected result.

fn($S){$X=0each$S as$C;$X=&add($X&sub(&ord($C)97))out!ABCL[$_=&mod($X,26)];}

Yes, that's right, I'm assigning the result of &mod into a variable.
Without it, it gives a syntax error, because ... I made mistakes in the compiler...

Using the code

Simply call the function.

$fn = fn($S){$X=0each$S as$C;$X=&add($X&sub(&ord($C)97))out!ABCL[$_=&mod($X,26)];}

// should output "h"
call $fn("codegolf");

Ungolfed

Somewhat code-y looking:

$fn = fn($string) => {
    $sum = 0;
    each $string as $char {
        $sum = &add($sum, &sub(&ord($char), 97));
    }
    
    $index = call &mod($sum, 26);
    
    echo !ABCL[$index];
}

Plain English-ish/Pseudo-code looking:

Set $fn to an anonymous function($string).
Begin.
    Set $sum to 0.
    
    Loop through $string as $char.
    Begin.
        Set $sum to the result of calling the function &add(
            $sum,
            Call the function &sub(
                Call the function &ord($char),
                97
            )
        ).
    End.
    
    Set $index to the result of calling the function &mod($sum, 26).
    
    Show the value !ABCL[$index].
End.

Both versions do exactly the same.

Factor + math.unicode,  25  24 bytes

[ 7 v+n Σ 26 mod 97 + ]

-1 byte thanks to some black magic from Arnauld!

Try it online!

     ! "helloworld"
7    ! "helloworld" 7
v+n  ! { 111 108 115 115 118 126 118 121 115 107 }
Σ    ! 1154
26   ! 1154 26
mod  ! 10
97   ! 10 97
+    ! 107

Ruby, 33 32 bytes

-1 byte thanks to Arnauld

->a{(a.sum{_1.ord+7}%26+97).chr}

Attempt This Online!

JavaScript (Node.js), 51 bytes

s=>(B=Buffer)([B(s).map(c=>t+=c+7,t=0)|97+t%26])+''

Try it online!

Python, 74 bytes

from string import*
f=lambda s,l=ascii_lowercase:l[sum(map(l.index,s))%26]

Try it online!

Python + golfing-shortcuts, 47 bytes

lambda S:Sl[s(m(Sl.index,S))%26]
from s import*

(Is this one a competitive answer?)

Thon (Symbols) s flag, 10 bytes

$åị$Σ26%å`

Explanation

$åị$Σ26%å`   // (implicit input as a string)
$  $         // For each character in the input string:
 åị          //   Get the index in the alphabet
             // (implicitly create a list of all of these indexes)
    Σ        // Sum the list
     26%     // Mod by 26
        å`   // Get that letter of the alphabet
             // (implicit output)