Module:GS pay: Difference between revisions
Appearance
Content deleted Content added
Updated values to 2023 |
adjust for 2024 GS base salary table |
||
Line 11: | Line 11: | ||
local WIGIncrease = {} |
local WIGIncrease = {} |
||
-- UPDATE THESE. Last Update: |
-- UPDATE THESE. Last Update: 2024 |
||
-- https://www.opm.gov/policy-data-oversight/pay-leave/salaries-wages/salary-tables/pdf/ |
-- https://www.opm.gov/policy-data-oversight/pay-leave/salaries-wages/salary-tables/pdf/2024/GS.pdf |
||
--For GS [Grade] Step 1 pay |
--For GS [Grade] Step 1 pay |
||
stepOnePay[3] = |
stepOnePay[3] = 26975 |
||
stepOnePay[4] = |
stepOnePay[4] = 30280 |
||
stepOnePay[5] = |
stepOnePay[5] = 33878 |
||
stepOnePay[6] = |
stepOnePay[6] = 37765 |
||
stepOnePay[7] = |
stepOnePay[7] = 41966 |
||
stepOnePay[8] = |
stepOnePay[8] = 46475 |
||
stepOnePay[9] = |
stepOnePay[9] = 51332 |
||
stepOnePay[10] = |
stepOnePay[10] = 56528 |
||
stepOnePay[11] = |
stepOnePay[11] = 62107 |
||
stepOnePay[12] = |
stepOnePay[12] = 74441 |
||
stepOnePay[13] = |
stepOnePay[13] = 88520 |
||
stepOnePay[14] = |
stepOnePay[14] = 104604 |
||
stepOnePay[15] = |
stepOnePay[15] = 123041 |
||
-- Within Grade increase for GS [Grade] |
-- Within Grade increase for GS [Grade] |
||
WIGIncrease[3] = |
WIGIncrease[3] = 899 |
||
WIGIncrease[4] = |
WIGIncrease[4] = 1009 |
||
WIGIncrease[5] = |
WIGIncrease[5] = 1129 |
||
WIGIncrease[6] = |
WIGIncrease[6] = 1259 |
||
WIGIncrease[7] = |
WIGIncrease[7] = 1399 |
||
WIGIncrease[8] = |
WIGIncrease[8] = 1549 |
||
WIGIncrease[9] = |
WIGIncrease[9] = 1711 |
||
WIGIncrease[10] = |
WIGIncrease[10] = 1884 |
||
WIGIncrease[11] = |
WIGIncrease[11] = 2070 |
||
WIGIncrease[12] = |
WIGIncrease[12] = 2481 |
||
WIGIncrease[13] = |
WIGIncrease[13] = 2951 |
||
WIGIncrease[14] = |
WIGIncrease[14] = 3487 |
||
WIGIncrease[15] = |
WIGIncrease[15] = 4101 |
||
-- GS1 Pay Table (because it has inconsistent WIG) |
-- GS1 Pay Table (because it has inconsistent WIG) |
||
GSOnePay[1] = |
GSOnePay[1] = 21986 |
||
GSOnePay[2] = |
GSOnePay[2] = 22724 |
||
GSOnePay[3] = |
GSOnePay[3] = 23454 |
||
GSOnePay[4] = |
GSOnePay[4] = 24183 |
||
GSOnePay[5] = |
GSOnePay[5] = 24912 |
||
GSOnePay[6] = |
GSOnePay[6] = 25339 |
||
GSOnePay[7] = |
GSOnePay[7] = 26063 |
||
GSOnePay[8] = |
GSOnePay[8] = 26792 |
||
GSOnePay[9] = |
GSOnePay[9] = 26821 |
||
GSOnePay[10] = |
GSOnePay[10] = 27502 |
||
-- GS2 Pay Table (because it has inconsistent WIG} |
-- GS2 Pay Table (because it has inconsistent WIG} |
||
GSTwoPay[1] = |
GSTwoPay[1] = 24722 |
||
GSTwoPay[2] = |
GSTwoPay[2] = 25310 |
||
GSTwoPay[3] = |
GSTwoPay[3] = 26129 |
||
GSTwoPay[4] = |
GSTwoPay[4] = 26821 |
||
GSTwoPay[5] = |
GSTwoPay[5] = 27124 |
||
GSTwoPay[6] = |
GSTwoPay[6] = 27922 |
||
GSTwoPay[7] = |
GSTwoPay[7] = 28720 |
||
GSTwoPay[8] = |
GSTwoPay[8] = 29518 |
||
GSTwoPay[9] = |
GSTwoPay[9] = 303164 |
||
GSTwoPay[10] = |
GSTwoPay[10] = 31114 |
||
-- Base pay calculation |
-- Base pay calculation |
Revision as of 21:52, 3 January 2024
{{Module rating }}
Implements Template:GS pay
Update using data from OPM[1]
- ^ "Salary Table 2024-GS" (PDF). Retrieved 2024-01-04.
Usage
{{#invoke:GS pay|get|GS Grade}}
{{#invoke:GS pay|get|GS Grade|Step Number}}
--
-- This module implements {{GS pay}}
-- There are 150 cells in the GS Pay table. This LUA reduces the amount of
-- manual input needed to 46
--
local p = {}
local stepOnePay = {}
local GSOnePay = {}
local GSTwoPay = {}
local WIGIncrease = {}
-- UPDATE THESE. Last Update: 2024
-- https://www.opm.gov/policy-data-oversight/pay-leave/salaries-wages/salary-tables/pdf/2024/GS.pdf
--For GS [Grade] Step 1 pay
stepOnePay[3] = 26975
stepOnePay[4] = 30280
stepOnePay[5] = 33878
stepOnePay[6] = 37765
stepOnePay[7] = 41966
stepOnePay[8] = 46475
stepOnePay[9] = 51332
stepOnePay[10] = 56528
stepOnePay[11] = 62107
stepOnePay[12] = 74441
stepOnePay[13] = 88520
stepOnePay[14] = 104604
stepOnePay[15] = 123041
-- Within Grade increase for GS [Grade]
WIGIncrease[3] = 899
WIGIncrease[4] = 1009
WIGIncrease[5] = 1129
WIGIncrease[6] = 1259
WIGIncrease[7] = 1399
WIGIncrease[8] = 1549
WIGIncrease[9] = 1711
WIGIncrease[10] = 1884
WIGIncrease[11] = 2070
WIGIncrease[12] = 2481
WIGIncrease[13] = 2951
WIGIncrease[14] = 3487
WIGIncrease[15] = 4101
-- GS1 Pay Table (because it has inconsistent WIG)
GSOnePay[1] = 21986
GSOnePay[2] = 22724
GSOnePay[3] = 23454
GSOnePay[4] = 24183
GSOnePay[5] = 24912
GSOnePay[6] = 25339
GSOnePay[7] = 26063
GSOnePay[8] = 26792
GSOnePay[9] = 26821
GSOnePay[10] = 27502
-- GS2 Pay Table (because it has inconsistent WIG}
GSTwoPay[1] = 24722
GSTwoPay[2] = 25310
GSTwoPay[3] = 26129
GSTwoPay[4] = 26821
GSTwoPay[5] = 27124
GSTwoPay[6] = 27922
GSTwoPay[7] = 28720
GSTwoPay[8] = 29518
GSTwoPay[9] = 303164
GSTwoPay[10] = 31114
-- Base pay calculation
function p.basePay(grade, step)
-- For Step 1 pay for all grades
if step == nil then
if grade > 2 then
-- Returns the Step 1 Pay for [grade]
return stepOnePay[grade]
elseif grade == 1 then
-- Returns GS1 Step 1
return GSOnePay[1]
else
-- Returns GS2 Step 1
return GSTwoPay[1]
end
-- For grades where step is specified
else
if grade > 2 then
-- Calculate GS [grade #], Step [step #] pay
local pay = stepOnePay[grade] + (WIGIncrease[grade] * (step - 1))
return pay
elseif grade == 1 then
return GSOnePay[step]
else
return GSTwoPay[step]
end
end
end
-- 'Main' function
function p.get(frame)
-- Error checking
if frame.args[1] == nil then
if frame.args[2] == nil then
return
end
else
-- Grab the basic pay number based on inputs
return p.basePay(tonumber(frame.args[1]), tonumber(frame.args[2]))
end
end
return p